Crate capped

Source
Expand description

Capped is a series of wrappers around types in the core and std library that have a maximum length.

This is useful for dealing with deserializing and serde support can be enabled with the serde feature flag.

Structsยง

CapError
Error produced when a cap is exceeded for the type T
CapString
A wrapper around String with a limit on its length, its length must be in the range 0..=N.
CapStringLengthError
Error returned when converting a string longer than N
CapU8
A u8 capped between 0..N
CapU16
A u16 capped between 0..N
CapU32
A u32 capped between 0..N
CapU64
A u64 capped between 0..N
CapUsize
A usize capped between 0..N
CapVec
CapVec is a Vec with a limit on its length, its length must be in the range 0..=N.
CapVecLengthError
Error returned when converting a vec longer than N