Skip to content

std::collections::ordered_map

Status: experimental

Sorted key/value map (i64 -> i64) backed by a flat pair Vec. Re-bind on every mutator.

API details and source

The implementation source contains the complete declarations and implementation notes. The table below lists canonical Gossamer call signatures; every item name links directly to its implementation file.

Item Canonical signature or declaration Description
contains_key fn contains_key(map: OrderedMap<String, i64>, key: String) -> bool Key-membership test.
get fn get(map: OrderedMap<String, i64>, key: String) -> Option<i64> Lookup; returns 0 if absent.
insert fn insert(map: OrderedMap<String, i64>, key: String, value: i64) -> OrderedMap<String, i64> Set key => value.
len fn len(map: OrderedMap<String, i64>) -> i64 Pair count.
remove fn remove(map: OrderedMap<String, i64>, key: String) -> OrderedMap<String, i64> Remove a key.