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§

source

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,)

source§

const POSTCARD_MAX_SIZE: usize = A::POSTCARD_MAX_SIZE

source§

impl MaxSize for usize

source§

impl MaxSize for isize

source§

impl<T: MaxSize> MaxSize for Option<T>

source§

impl MaxSize for NonZeroU16

source§

impl MaxSize for u16

source§

impl<A: MaxSize, B: MaxSize, C: MaxSize, D: MaxSize, E: MaxSize> MaxSize for (A, B, C, D, E)

source§

impl MaxSize for u128

source§

impl MaxSize for NonZeroU32

source§

impl MaxSize for ()

source§

impl MaxSize for NonZeroUsize

source§

impl MaxSize for NonZeroU64

source§

impl<const N: usize> MaxSize for String<N>

Available on crate feature heapless only.
source§

impl MaxSize for i8

source§

impl MaxSize for u32

source§

impl MaxSize for NonZeroI128

source§

impl MaxSize for i128

source§

impl<T: MaxSize, E: MaxSize> MaxSize for Result<T, E>

source§

impl<T: MaxSize, const N: usize> MaxSize for Vec<T, N>

Available on crate feature heapless only.
source§

impl<A: MaxSize, B: MaxSize, C: MaxSize, D: MaxSize> MaxSize for (A, B, C, D)

source§

impl MaxSize for i16

source§

impl MaxSize for u8

source§

impl<T: MaxSize, const N: usize> MaxSize for [T; N]

source§

impl MaxSize for i64

source§

impl MaxSize for NonZeroI32

source§

impl<A: MaxSize, B: MaxSize, C: MaxSize, D: MaxSize, E: MaxSize, F: MaxSize> MaxSize for (A, B, C, D, E, F)

source§

impl MaxSize for NonZeroU8

source§

impl MaxSize for NonZeroU128

source§

impl<T: MaxSize> MaxSize for &T

source§

const POSTCARD_MAX_SIZE: usize = T::POSTCARD_MAX_SIZE

source§

impl MaxSize for NonZeroIsize

source§

impl MaxSize for u64

source§

impl MaxSize for i32

source§

impl MaxSize for NonZeroI16

source§

impl<A: MaxSize, B: MaxSize, C: MaxSize> MaxSize for (A, B, C)

source§

impl MaxSize for NonZeroI8

source§

impl MaxSize for f64

source§

impl MaxSize for char

source§

impl<T> MaxSize for PhantomData<T>

source§

impl MaxSize for f32

source§

impl<T: MaxSize> MaxSize for &mut T

source§

const POSTCARD_MAX_SIZE: usize = T::POSTCARD_MAX_SIZE

source§

impl MaxSize for NonZeroI64

source§

impl MaxSize for bool

source§

impl<A: MaxSize, B: MaxSize> MaxSize for (A, B)

Implementors§