pub fn fit_map<K: Ord, V>(
at: usize,
value: BTreeMap<K, V>,
bound: usize,
behaviour: TryConstruct,
) -> Result<Narrowed<BTreeMap<K, V>>, WireError>Expand description
A map that has been read whole, against the receiver’s bound.
Table 11 names map among the forms a TRIM may be written on —
“string, wide string, sequence, or map” — and Table 17’s
MAP_TYPE row carries the same O2.length <= T1.length the
SEQUENCE_TYPE row does, counted in entries.
§7.3.1.2.1.12.3 takes the first elements. A map has no declaration
order once it is in an ordered container, so the first bound
entries are the bound smallest keys — which is the same rule
crate::Writer::write_map writes under and not a second one.
§Errors
As fit_string.