Module dict

Module dict 

Source
Expand description

Dictionary implementation.

Structs§

AugDict
Typed augmented dictionary with fixed length keys.
AugIter
An iterator over the entries of an AugDict.
Dict
Typed dictionary with fixed length keys.
Iter
An iterator over the entries of a Dict.
Keys
An iterator over the keys of a Dict.
RawDict
Dictionary with fixed length keys (where N is a number of bits in each key).
RawIter
An iterator over the entries of a RawDict or a Dict.
RawKeys
An iterator over the keys of a RawDict or a Dict.
RawOwnedIter
An iterator over the owned entries of a RawDict.
RawOwnedValues
An iterator over the owned values of a RawDict.
RawValues
An iterator over the values of a RawDict or a Dict.
UnionIter
An iterator over the entries across two Dict.
UnionRawIter
An iterator over the entries across two RawDict or two Dict.
Values
An iterator over the values of a Dict.

Enums§

Branch
Which branch to take when traversing the tree.
DictBound
Dictionary bound.
SetMode
Dictionary insertion mode.

Traits§

AugDictExtra
A trait for values that can be used as augmented values in an augmented dictionary.
DictKey
Type which can be used as a dictionary key.
SearchByExtra
AugDict search control flow.

Functions§

aug_dict_find_by_extra
Searches for an item using a predicate on extra values.
aug_dict_insert
Inserts the value associated with key in aug dictionary in accordance with the logic of the specified SetMode and comparator for extra
aug_dict_remove_owned
Removes the value associated with key in aug dictionary. Returns a tuple with a new dictionary cell and an optional removed value.
build_aug_dict_from_sorted_iter
Builds a new augmented dictionary from an iterator of sorted unique entries.
build_dict_from_sorted_iter
Builds a new dictionary from an iterator of sorted unique entries.
dict_find_bound
Finds the specified dict bound and returns a key and a value corresponding to the key.
dict_find_bound_owned
Finds the specified dict bound and returns a key and cell slice parts corresponding to the key.
dict_find_owned
Returns cell slice parts of the value corresponding to the key.
dict_get
Returns a CellSlice of the value corresponding to the key.
dict_get_owned
Returns cell slice parts of the value corresponding to the key.
dict_get_subdict
Gets subdictionary by specified prefiex Returns optional dictionary as Cell representation if specified prefix is present in dictionary
dict_insert
Inserts the value associated with key in dictionary in accordance with the logic of the specified SetMode.
dict_insert_owned
Inserts the value associated with key in dictionary in accordance with the logic of the specified SetMode.
dict_load_from_root
Loads a non-empty dictionary from the root cell.
dict_merge
Merges two dictionaries into one (left)
dict_remove_bound_owned
Removes the specified dict bound and returns a removed key and cell slice parts.
dict_remove_owned
Removes the value associated with key in dictionary. Returns a tuple with a new dictionary cell and an optional removed value.
dict_split_by_prefix
Splits one dictionary by the key prefix

Type Aliases§

AugDictFn
A type for a comparator function for AugDict.
DictOwnedEntry
Type alias for a pair of key and value as cell slice parts.