Skip to main content

Module bounded

Module bounded 

Source
Available on crate feature alloc and crate feature static-size and (crate features alloc or derive or serde or static-size or std or zero-copy) only.
Expand description

Bounded types for compile-time size guarantees.

These types enforce capacity limits both at construction time and during decoding, preventing Denial-of-Service attacks via unbounded allocations.

Structs§

BoundedString
A String wrapper with a compile-time byte-length capacity limit.
BoundedVec
A Vec wrapper with a compile-time capacity limit.
BoundsExceeded
Error returned when a value exceeds a bounded type’s capacity.