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 range0..=N
. - CapString
Length Error - 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 aVec
with 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