postcard::experimental::max_size

Trait 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§

Source

const POSTCARD_MAX_SIZE: usize

The maximum possible size that the serialization of this type can have, in bytes.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl MaxSize for bool

Source§

impl MaxSize for char

Source§

impl MaxSize for f32

Source§

impl MaxSize for f64

Source§

impl MaxSize for i8

Source§

impl MaxSize for i16

Source§

impl MaxSize for i32

Source§

impl MaxSize for i64

Source§

impl MaxSize for i128

Source§

impl MaxSize for isize

Source§

impl MaxSize for u8

Source§

impl MaxSize for u16

Source§

impl MaxSize for u32

Source§

impl MaxSize for u64

Source§

impl MaxSize for u128

Source§

impl MaxSize for ()

Source§

impl MaxSize for usize

Source§

impl MaxSize for NonZeroI8

Source§

impl MaxSize for NonZeroI16

Source§

impl MaxSize for NonZeroI32

Source§

impl MaxSize for NonZeroI64

Source§

impl MaxSize for NonZeroI128

Source§

impl MaxSize for NonZeroIsize

Source§

impl MaxSize for NonZeroU8

Source§

impl MaxSize for NonZeroU16

Source§

impl MaxSize for NonZeroU32

Source§

impl MaxSize for NonZeroU64

Source§

impl MaxSize for NonZeroU128

Source§

impl MaxSize for NonZeroUsize

Source§

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

Source§

const POSTCARD_MAX_SIZE: usize = A::POSTCARD_MAX_SIZE

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

impl<T> MaxSize for PhantomData<T>

Source§

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

Source§

impl<T: MaxSize> MaxSize for &T

Source§

const POSTCARD_MAX_SIZE: usize = T::POSTCARD_MAX_SIZE

Source§

impl<T: MaxSize> MaxSize for &mut T

Source§

const POSTCARD_MAX_SIZE: usize = T::POSTCARD_MAX_SIZE

Source§

impl<T: MaxSize> MaxSize for Box<T>

Available on crate feature alloc only.
Source§

const POSTCARD_MAX_SIZE: usize = T::POSTCARD_MAX_SIZE

Source§

impl<T: MaxSize> MaxSize for Rc<T>

Available on crate feature alloc only.
Source§

const POSTCARD_MAX_SIZE: usize = T::POSTCARD_MAX_SIZE

Source§

impl<T: MaxSize> MaxSize for Arc<T>

Available on crate feature alloc and target_has_atomic="ptr" only.
Source§

const POSTCARD_MAX_SIZE: usize = T::POSTCARD_MAX_SIZE

Source§

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

Source§

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

Source§

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

Available on crate feature heapless only.
Source§

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

Available on crate feature heapless only.

Implementors§