bobzhang/typify/collections does not have a README file

    StrMap

    pub struct StrMap[V] {
    // private fields
    }

    A map from String keys ordered by code point (Rust BTreeMap<String, V> semantics). Backed by a sorted array; intended for schema-sized data.
    impl Eq for StrMap[V]

    StrMap::contains

    fn[V] StrMap::contains(self : StrMap[V], key : StringView) -> Bool

    StrMap::copy

    fn[V] StrMap::copy(self : StrMap[V]) -> StrMap[V]

    StrMap::first

    fn[V] StrMap::first(self : StrMap[V]) -> (String, V)?

    StrMap::from_array

    fn[V] StrMap::from_array(pairs : ArrayView[(String, V)]) -> StrMap[V]

    Build a map from pairs; later duplicates overwrite earlier ones.

    StrMap::get

    fn[V] StrMap::get(self : StrMap[V], key : StringView) -> V?

    StrMap::insert

    fn[V] StrMap::insert(self : StrMap[V], key : String, value : V) -> V?

    Insert or replace; returns the previous value.

    StrMap::is_empty

    fn[V] StrMap::is_empty(self : StrMap[V]) -> Bool

    StrMap::iter

    fn[V] StrMap::iter(self : StrMap[V]) -> Iter[(String, V)]

    Entries in key order.

    StrMap::iter2

    fn[V] StrMap::iter2(self : StrMap[V]) -> Iter2[String, V]

    Entries in key order.

    StrMap::keys

    fn[V] StrMap::keys(self : StrMap[V]) -> Array[String]

    StrMap::length

    fn[V] StrMap::length(self : StrMap[V]) -> Int

    StrMap::map

    fn[V, W] StrMap::map(self : StrMap[V], f : (V) -> W) -> StrMap[W]

    StrMap::new

    fn[V] StrMap::new() -> StrMap[V]

    StrMap::remove

    fn[V] StrMap::remove(self : StrMap[V], key : StringView) -> V?

    StrMap::set

    fn[V] StrMap::set(self : StrMap[V], key : String, value : V) -> Unit

    StrMap::to_array

    fn[V] StrMap::to_array(self : StrMap[V]) -> Array[(String, V)]

    StrMap::values

    fn[V] StrMap::values(self : StrMap[V]) -> Array[V]

    StrSet

    pub struct StrSet {
    // private fields
    }

    A set of strings ordered by code point (Rust BTreeSet<String>).
    impl Eq for StrSet

    StrSet::add

    fn StrSet::add(self : StrSet, item : String) -> Unit

    Insert, ignoring whether the item was already present.

    StrSet::contains

    fn StrSet::contains(self : StrSet, item : StringView) -> Bool

    StrSet::copy

    fn StrSet::copy(self : StrSet) -> StrSet

    StrSet::from_array

    fn StrSet::from_array(items : ArrayView[String]) -> StrSet

    StrSet::insert

    fn StrSet::insert(self : StrSet, item : String) -> Bool

    Insert; returns true if the item was not present.

    StrSet::is_empty

    fn StrSet::is_empty(self : StrSet) -> Bool

    StrSet::is_subset

    fn StrSet::is_subset(self : StrSet, other : StrSet) -> Bool

    StrSet::iter

    fn StrSet::iter(self : StrSet) -> Iter[String]

    Items in order.

    StrSet::length

    fn StrSet::length(self : StrSet) -> Int

    StrSet::new

    fn StrSet::new() -> StrSet

    StrSet::remove

    fn StrSet::remove(self : StrSet, item : StringView) -> Bool

    StrSet::to_array

    fn StrSet::to_array(self : StrSet) -> Array[String]

    StrSet::union

    fn StrSet::union(self : StrSet, other : StrSet) -> StrSet

    compare_str

    fn compare_str(a : StringView, b : StringView) -> Int

    Compare two strings by Unicode code points.

    This is the ordering of Rust's str (UTF-8 byte order), which upstream typify relies on through BTreeMap<String, _> iteration. MoonBit's own String::compare orders by length first, so it must not be used where iteration order is observable.

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io