Skip to main content

Module collections

Module collections 

Source
Expand description

SSZ blanket impls for alloc::collections::BTreeMap.

Wire format: equivalent to List<(K, V), MAX_BTREE_LEN> — i.e., a flat list of sorted (K, V) pairs. Decode rejects out-of-order or duplicate keys.

Hash form: same as List<(K, V), MAX_BTREE_LEN> — merkleize the pair roots, mix in length.

Constants§

MAX_BTREE_LEN
Implicit cap on BTreeMap length, in elements. Chosen as 1 << 32 (matches the SCALE u32 count-prefix cap).
MAX_VEC_LEN
Implicit cap on alloc::vec::Vec length, in elements. Matches the legacy SCALE u32 count-prefix cap (1 << 32).