Skip to main content

Module vec

Module vec 

Source
Expand description

Codec implementation for Vec<T>.

Vector lengths are restricted to a u32 so their wire representation is consistent across architectures, but allocation limits remain target-dependent. On a 32-bit target, a Vec<T> with non-zero-sized T cannot allocate more than isize::MAX bytes. Callers should use RangeCfg to choose a decoded length limit that works on all supported targets.