Expand description
Backend-neutral fallible allocation reservation helpers. Backend-neutral fallible allocation reservation helpers.
Concrete backends still own domain wording, but the arithmetic for “reserve additional” and “reserve up to target capacity” must not drift.
Functions§
- reserve_
hash_ map_ to_ capacity - Ensure a
HashMapcan holdtarget_capacityentries without changing length. - reserve_
hash_ set_ to_ capacity - Ensure a
HashSetcan holdtarget_capacityentries without changing length. - reserve_
smallvec_ additional - Reserve additional capacity for a
SmallVecwithout changing its length. - reserve_
smallvec_ to_ capacity - Ensure a
SmallVeccan holdtarget_capacityitems without changing length. - reserve_
vec_ additional - Reserve additional capacity for a
Vecwithout changing its length. - reserve_
vec_ to_ capacity - Ensure a
Veccan holdtarget_capacityitems without changing length. - try_
reserve_ hash_ map_ to_ capacity - Ensure a
HashMapcan holdtarget_capacityentries without changing length, returning the standard allocation error for domain-specific adapters. - try_
reserve_ hash_ set_ to_ capacity - Ensure a
HashSetcan holdtarget_capacityentries without changing length, returning the standard allocation error for domain-specific adapters. - try_
reserve_ vec_ to_ capacity - Ensure a
Veccan holdtarget_capacityitems without changing length, returning the standard allocation error for domain-specific adapters.