pub trait MaxSize {
const POSTCARD_MAX_SIZE: usize;
}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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl MaxSize for NonZeroI16
impl MaxSize for NonZeroI16
const POSTCARD_MAX_SIZE: usize = i16::POSTCARD_MAX_SIZE
Source§impl MaxSize for NonZeroI32
impl MaxSize for NonZeroI32
const POSTCARD_MAX_SIZE: usize = i32::POSTCARD_MAX_SIZE
Source§impl MaxSize for NonZeroI64
impl MaxSize for NonZeroI64
const POSTCARD_MAX_SIZE: usize = i64::POSTCARD_MAX_SIZE
Source§impl MaxSize for NonZeroI128
impl MaxSize for NonZeroI128
const POSTCARD_MAX_SIZE: usize = i128::POSTCARD_MAX_SIZE
Source§impl MaxSize for NonZeroIsize
impl MaxSize for NonZeroIsize
const POSTCARD_MAX_SIZE: usize = isize::POSTCARD_MAX_SIZE
Source§impl MaxSize for NonZeroU16
impl MaxSize for NonZeroU16
const POSTCARD_MAX_SIZE: usize = u16::POSTCARD_MAX_SIZE
Source§impl MaxSize for NonZeroU32
impl MaxSize for NonZeroU32
const POSTCARD_MAX_SIZE: usize = u32::POSTCARD_MAX_SIZE
Source§impl MaxSize for NonZeroU64
impl MaxSize for NonZeroU64
const POSTCARD_MAX_SIZE: usize = u64::POSTCARD_MAX_SIZE
Source§impl MaxSize for NonZeroU128
impl MaxSize for NonZeroU128
const POSTCARD_MAX_SIZE: usize = u128::POSTCARD_MAX_SIZE
Source§impl MaxSize for NonZeroUsize
impl MaxSize for NonZeroUsize
const POSTCARD_MAX_SIZE: usize = usize::POSTCARD_MAX_SIZE
Source§impl<A: MaxSize, B: MaxSize, C: MaxSize, D: MaxSize, E: MaxSize, F: MaxSize> MaxSize for (A, B, C, D, E, F)
impl<A: MaxSize, B: MaxSize, C: MaxSize, D: MaxSize, E: MaxSize, F: MaxSize> MaxSize for (A, B, C, D, E, F)
const POSTCARD_MAX_SIZE: usize
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<A: MaxSize, B: MaxSize, C: MaxSize, D: MaxSize> MaxSize for (A, B, C, D)
impl<A: MaxSize, B: MaxSize, C: MaxSize, D: MaxSize> MaxSize for (A, B, C, D)
const POSTCARD_MAX_SIZE: usize
Source§impl<A: MaxSize, B: MaxSize, C: MaxSize> MaxSize for (A, B, C)
impl<A: MaxSize, B: MaxSize, C: MaxSize> MaxSize for (A, B, C)
const POSTCARD_MAX_SIZE: usize
Source§impl<A: MaxSize> MaxSize for (A,)
impl<A: MaxSize> MaxSize for (A,)
const POSTCARD_MAX_SIZE: usize = A::POSTCARD_MAX_SIZE
Source§impl<T: MaxSize> MaxSize for &mut T
impl<T: MaxSize> MaxSize for &mut T
const POSTCARD_MAX_SIZE: usize = T::POSTCARD_MAX_SIZE
Source§impl<T: MaxSize> MaxSize for Arc<T>
Available on target_has_atomic=ptr and crate feature alloc only.
impl<T: MaxSize> MaxSize for Arc<T>
Available on
target_has_atomic=ptr and crate feature alloc only.const POSTCARD_MAX_SIZE: usize = T::POSTCARD_MAX_SIZE
Source§impl<T: MaxSize> MaxSize for Box<T>
Available on crate feature alloc only.
impl<T: MaxSize> MaxSize for Box<T>
Available on crate feature
alloc only.const POSTCARD_MAX_SIZE: usize = T::POSTCARD_MAX_SIZE
Source§impl<T: MaxSize> MaxSize for RangeFrom<T>
impl<T: MaxSize> MaxSize for RangeFrom<T>
const POSTCARD_MAX_SIZE: usize = T::POSTCARD_MAX_SIZE
Source§impl<T: MaxSize> MaxSize for RangeInclusive<T>
impl<T: MaxSize> MaxSize for RangeInclusive<T>
const POSTCARD_MAX_SIZE: usize
Source§impl<T: MaxSize> MaxSize for RangeTo<T>
impl<T: MaxSize> MaxSize for RangeTo<T>
const POSTCARD_MAX_SIZE: usize = T::POSTCARD_MAX_SIZE
Source§impl<T: MaxSize> MaxSize for Rc<T>
Available on crate feature alloc only.
impl<T: MaxSize> MaxSize for Rc<T>
Available on crate feature
alloc only.