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
Stringwith a limit on its length, its length must be in the range0..=N. - CapString
Length Error - Error returned when converting a string longer than N
- CapU8
- A
u8capped between 0..N - CapU16
- A
u16capped between 0..N - CapU32
- A
u32capped between 0..N - CapU64
- A
u64capped between 0..N - CapUsize
- A
usizecapped between 0..N - CapVec
CapVecis aVecwith a limit on its length, its length must be in the range0..=N.- CapVec
Length Error - Error returned when converting a vec longer than N