Sign in

    wqbcs/moon_collections/indexmap does not have a README file

    Entry

    pub struct Entry[K, V] {
    key : K
    value : V
    } derive(Eq,
    Debug
    )

    IndexMap

    pub struct IndexMap[K, V] {
    entries : Array[Entry[K, V]]
    indices :
    HashMap
    [K, Int]
    fp_cache : UInt64
    fp_dirty : Bool
    }

    impl Eq for IndexMap[K, V]
    impl Collection for IndexMap[K, V]
    impl Deterministic for IndexMap[K, V]

    IndexMap::at

    fn[K : Hash + Eq, V] IndexMap::at(self : IndexMap[K, V], key : K) -> V?

    IndexMap::clear

    fn[K : Hash + Eq, V] IndexMap::clear(self : IndexMap[K, V]) -> Unit

    IndexMap::clone

    fn[K : Hash + Eq, V] IndexMap::clone(self : IndexMap[K, V]) -> IndexMap[K, V]

    IndexMap::contains

    fn[K : Hash + Eq, V] IndexMap::contains(self : IndexMap[K, V], key : K) -> Bool

    IndexMap::drain

    fn[K : Hash + Eq, V] IndexMap::drain(self : IndexMap[K, V], pred : (K, V) -> Bool) -> IndexMap[K, V]

    IndexMap::each

    fn[K, V] IndexMap::each(self : IndexMap[K, V], f : (K, V) -> Unit) -> Unit

    IndexMap::entries

    fn[K, V] IndexMap::entries(self : IndexMap[K, V]) -> Array[Entry[K, V]]

    IndexMap::filter

    fn[K : Hash + Eq, V] IndexMap::filter(self : IndexMap[K, V], pred : (K, V) -> Bool) -> IndexMap[K, V]

    IndexMap::first

    fn[K, V] IndexMap::first(self : IndexMap[K, V]) -> (K, V)?

    IndexMap::from_array

    fn[K : Hash + Eq, V] IndexMap::from_array(pairs : Array[(K, V)]) -> IndexMap[K, V]

    IndexMap::get

    fn[K : Hash + Eq, V] IndexMap::get(self : IndexMap[K, V], key : K) -> V?

    IndexMap::get_index

    fn[K, V] IndexMap::get_index(self : IndexMap[K, V], index : Int) -> (K, V)?

    IndexMap::get_index_of

    fn[K : Hash + Eq, V] IndexMap::get_index_of(self : IndexMap[K, V], key : K) -> Int?

    IndexMap::get_key_at

    fn[K, V] IndexMap::get_key_at(self : IndexMap[K, V], index : Int) -> K?

    IndexMap::get_or_insert

    fn[K : Hash + Eq, V] IndexMap::get_or_insert(self : IndexMap[K, V], key : K, default : V) -> V

    IndexMap::get_or_insert_with

    fn[K : Hash + Eq, V] IndexMap::get_or_insert_with(self : IndexMap[K, V], key : K, default_fn : () -> V) -> V

    IndexMap::get_value_at

    fn[K, V] IndexMap::get_value_at(self : IndexMap[K, V], index : Int) -> V?

    IndexMap::has_all

    fn[K : Hash + Eq, V] IndexMap::has_all(self : IndexMap[K, V], keys : Array[K]) -> Bool

    IndexMap::has_any

    fn[K : Hash + Eq, V] IndexMap::has_any(self : IndexMap[K, V], keys : Array[K]) -> Bool

    IndexMap::insert

    fn[K : Hash + Eq, V] IndexMap::insert(self : IndexMap[K, V], key : K, value : V) -> V?

    IndexMap::insert_after

    fn[K : Hash + Eq, V] IndexMap::insert_after(self : IndexMap[K, V], target : K, key : K, value : V) -> Bool

    IndexMap::insert_before

    fn[K : Hash + Eq, V] IndexMap::insert_before(self : IndexMap[K, V], target : K, key : K, value : V) -> Bool

    IndexMap::is_empty

    fn[K, V] IndexMap::is_empty(self : IndexMap[K, V]) -> Bool

    IndexMap::iter

    fn[K, V] IndexMap::iter(self : IndexMap[K, V]) -> Iter[(K, V)]

    IndexMap::keys

    fn[K, V] IndexMap::keys(self : IndexMap[K, V]) -> Iter[K]

    IndexMap::keys_array

    fn[K, V] IndexMap::keys_array(self : IndexMap[K, V]) -> Array[K]

    IndexMap::last

    fn[K, V] IndexMap::last(self : IndexMap[K, V]) -> (K, V)?

    IndexMap::len

    fn[K, V] IndexMap::len(self : IndexMap[K, V]) -> Int

    IndexMap::map_values

    fn[K : Hash + Eq, V, R] IndexMap::map_values(self : IndexMap[K, V], f : (V) -> R) -> IndexMap[K, R]

    IndexMap::merge

    fn[K : Hash + Eq, V] IndexMap::merge(self : IndexMap[K, V], other : IndexMap[K, V], resolve : (V, V) -> V) -> IndexMap[K, V]

    IndexMap::move_to_back

    fn[K : Hash + Eq, V] IndexMap::move_to_back(self : IndexMap[K, V], key : K) -> Bool

    IndexMap::move_to_front

    fn[K : Hash + Eq, V] IndexMap::move_to_front(self : IndexMap[K, V], key : K) -> Bool

    IndexMap::new

    fn[K : Hash + Eq, V] IndexMap::new() -> IndexMap[K, V]

    IndexMap::op_index

    #alias("_[_]")
    fn[K : Hash + Eq, V] IndexMap::op_index(self : IndexMap[K, V], key : K) -> V?

    IndexMap::op_set

    fn[K : Hash + Eq, V] IndexMap::op_set(self : IndexMap[K, V], key : K, value : V) -> Unit

    IndexMap::pop_back

    fn[K : Hash + Eq, V] IndexMap::pop_back(self : IndexMap[K, V]) -> (K, V)?

    IndexMap::pop_front

    fn[K : Hash + Eq, V] IndexMap::pop_front(self : IndexMap[K, V]) -> (K, V)?

    IndexMap::remove

    fn[K : Hash + Eq, V] IndexMap::remove(self : IndexMap[K, V], key : K) -> V?

    IndexMap::remove_entry

    fn[K : Hash + Eq, V] IndexMap::remove_entry(self : IndexMap[K, V], key : K) -> (K, V)?

    IndexMap::retain

    fn[K : Hash + Eq, V] IndexMap::retain(self : IndexMap[K, V], pred : (K, V) -> Bool) -> Unit

    IndexMap::retain_keys

    fn[K : Hash + Eq, V] IndexMap::retain_keys(self : IndexMap[K, V], pred : (K) -> Bool) -> Unit

    IndexMap::rev_iter

    fn[K, V] IndexMap::rev_iter(self : IndexMap[K, V]) -> Iter[(K, V)]

    IndexMap::reverse

    fn[K : Hash + Eq, V] IndexMap::reverse(self : IndexMap[K, V]) -> Unit

    IndexMap::shift_remove

    fn[K : Hash + Eq, V] IndexMap::shift_remove(self : IndexMap[K, V], key : K) -> V?

    IndexMap::shift_remove_index

    fn[K : Hash + Eq, V] IndexMap::shift_remove_index(self : IndexMap[K, V], index : Int) -> (K, V)?

    IndexMap::sort_keys

    fn[K : Hash + Eq + Compare, V] IndexMap::sort_keys(self : IndexMap[K, V]) -> Unit

    IndexMap::swap_indices

    fn[K : Hash + Eq, V] IndexMap::swap_indices(self : IndexMap[K, V], a : Int, b : Int) -> Bool

    IndexMap::swap_remove

    fn[K : Hash + Eq, V] IndexMap::swap_remove(self : IndexMap[K, V], key : K) -> V?

    IndexMap::swap_remove_index

    fn[K : Hash + Eq, V] IndexMap::swap_remove_index(self : IndexMap[K, V], index : Int) -> (K, V)?

    IndexMap::to_array

    fn[K, V] IndexMap::to_array(self : IndexMap[K, V]) -> Array[(K, V)]

    IndexMap::update

    fn[K : Hash + Eq, V] IndexMap::update(self : IndexMap[K, V], key : K, f : (V) -> V) -> Bool

    IndexMap::update_or_insert

    fn[K : Hash + Eq, V] IndexMap::update_or_insert(self : IndexMap[K, V], key : K, f : (V) -> V, default : V) -> V

    IndexMap::values

    fn[K, V] IndexMap::values(self : IndexMap[K, V]) -> Iter[V]

    IndexMap::values_array

    fn[K, V] IndexMap::values_array(self : IndexMap[K, V]) -> Array[V]

    IndexSet

    pub struct IndexSet[K] {
    map : IndexMap[K, Unit]
    } derive(
    Debug
    )

    impl Eq for IndexSet[K]
    impl Collection for IndexSet[K]

    IndexSet::clear

    fn[K : Hash + Eq] IndexSet::clear(self : IndexSet[K]) -> Unit

    IndexSet::clone

    fn[K : Hash + Eq] IndexSet::clone(self : IndexSet[K]) -> IndexSet[K]

    IndexSet::contains

    fn[K : Hash + Eq] IndexSet::contains(self : IndexSet[K], key : K) -> Bool

    IndexSet::difference

    fn[K : Hash + Eq] IndexSet::difference(self : IndexSet[K], other : IndexSet[K]) -> IndexSet[K]

    IndexSet::each

    fn[K] IndexSet::each(self : IndexSet[K], f : (K) -> Unit) -> Unit

    IndexSet::extend_

    fn[K : Hash + Eq] IndexSet::extend_(self : IndexSet[K], items : Array[K]) -> Unit

    IndexSet::from_array

    fn[K : Hash + Eq] IndexSet::from_array(items : Array[K]) -> IndexSet[K]

    IndexSet::get_index

    fn[K] IndexSet::get_index(self : IndexSet[K], index : Int) -> K?

    IndexSet::get_index_of

    fn[K : Hash + Eq] IndexSet::get_index_of(self : IndexSet[K], key : K) -> Int?

    IndexSet::insert

    fn[K : Hash + Eq] IndexSet::insert(self : IndexSet[K], key : K) -> Unit

    IndexSet::intersect

    fn[K : Hash + Eq] IndexSet::intersect(self : IndexSet[K], other : IndexSet[K]) -> IndexSet[K]

    IndexSet::is_disjoint

    fn[K : Hash + Eq] IndexSet::is_disjoint(self : IndexSet[K], other : IndexSet[K]) -> Bool

    IndexSet::is_empty

    fn[K] IndexSet::is_empty(self : IndexSet[K]) -> Bool

    IndexSet::is_subset

    fn[K : Hash + Eq] IndexSet::is_subset(self : IndexSet[K], other : IndexSet[K]) -> Bool

    IndexSet::is_superset

    fn[K : Hash + Eq] IndexSet::is_superset(self : IndexSet[K], other : IndexSet[K]) -> Bool

    IndexSet::iter

    fn[K] IndexSet::iter(self : IndexSet[K]) -> Iter[K]

    IndexSet::keys

    fn[K] IndexSet::keys(self : IndexSet[K]) -> Iter[K]

    IndexSet::len

    fn[K] IndexSet::len(self : IndexSet[K]) -> Int

    IndexSet::move_to_back

    fn[K : Hash + Eq] IndexSet::move_to_back(self : IndexSet[K], key : K) -> Bool

    IndexSet::move_to_front

    fn[K : Hash + Eq] IndexSet::move_to_front(self : IndexSet[K], key : K) -> Bool

    IndexSet::new

    fn[K : Hash + Eq] IndexSet::new() -> IndexSet[K]

    IndexSet::pop_back

    fn[K : Hash + Eq] IndexSet::pop_back(self : IndexSet[K]) -> K?

    IndexSet::pop_front

    fn[K : Hash + Eq] IndexSet::pop_front(self : IndexSet[K]) -> K?

    IndexSet::remove

    fn[K : Hash + Eq] IndexSet::remove(self : IndexSet[K], key : K) -> Bool

    IndexSet::retain

    fn[K : Hash + Eq] IndexSet::retain(self : IndexSet[K], pred : (K) -> Bool) -> Unit

    IndexSet::rev_iter

    fn[K] IndexSet::rev_iter(self : IndexSet[K]) -> Iter[K]

    IndexSet::reverse

    fn[K : Hash + Eq] IndexSet::reverse(self : IndexSet[K]) -> Unit

    IndexSet::shift_remove

    fn[K : Hash + Eq] IndexSet::shift_remove(self : IndexSet[K], key : K) -> Bool

    IndexSet::symmetric_difference

    fn[K : Hash + Eq] IndexSet::symmetric_difference(self : IndexSet[K], other : IndexSet[K]) -> IndexSet[K]

    IndexSet::to_array

    fn[K] IndexSet::to_array(self : IndexSet[K]) -> Array[K]

    IndexSet::union

    fn[K : Hash + Eq] IndexSet::union(self : IndexSet[K], other : IndexSet[K]) -> IndexSet[K]