Trait postcard::experimental::max_size::MaxSize
source · pub trait MaxSize {
const POSTCARD_MAX_SIZE: usize;
}
Available on crate feature
experimental-derive
only.Expand description
This trait is used to enforce the maximum size required to store the serialization of a given type.
Required Associated Constants§
sourceconst POSTCARD_MAX_SIZE: usize
const POSTCARD_MAX_SIZE: usize
The maximum possible size that the serialization of this type can have, in bytes.
Implementations on Foreign Types§
source§impl<A: MaxSize> MaxSize for (A,)
impl<A: MaxSize> MaxSize for (A,)
const POSTCARD_MAX_SIZE: usize = A::POSTCARD_MAX_SIZE
source§impl MaxSize for NonZeroU16
impl MaxSize for NonZeroU16
const POSTCARD_MAX_SIZE: usize = 3usize
source§impl<A: MaxSize, B: MaxSize, C: MaxSize, D: MaxSize, E: MaxSize> MaxSize for (A, B, C, D, E)
impl<A: MaxSize, B: MaxSize, C: MaxSize, D: MaxSize, E: MaxSize> MaxSize for (A, B, C, D, E)
const POSTCARD_MAX_SIZE: usize = _
source§impl MaxSize for NonZeroU32
impl MaxSize for NonZeroU32
const POSTCARD_MAX_SIZE: usize = 5usize
source§impl MaxSize for NonZeroUsize
impl MaxSize for NonZeroUsize
const POSTCARD_MAX_SIZE: usize = 10usize
source§impl MaxSize for NonZeroU64
impl MaxSize for NonZeroU64
const POSTCARD_MAX_SIZE: usize = 10usize
source§impl<const N: usize> MaxSize for String<N>
Available on crate feature heapless
only.
impl<const N: usize> MaxSize for String<N>
Available on crate feature
heapless
only.const POSTCARD_MAX_SIZE: usize = _
source§impl MaxSize for NonZeroI128
impl MaxSize for NonZeroI128
const POSTCARD_MAX_SIZE: usize = 19usize
source§impl<T: MaxSize, E: MaxSize> MaxSize for Result<T, E>
impl<T: MaxSize, E: MaxSize> MaxSize for Result<T, E>
const POSTCARD_MAX_SIZE: usize = _
source§impl<T: MaxSize, const N: usize> MaxSize for Vec<T, N>
Available on crate feature heapless
only.
impl<T: MaxSize, const N: usize> MaxSize for Vec<T, N>
Available on crate feature
heapless
only.