pub trait FixedSized: Copy + Sized {
const SERIALIZED_SIZE: usize = _;
}Expand description
A trait which should be given to any type which will always take up the same amount of space
when serialized. This goes one step beyond the Sized trait which only requires it to take up
a set amount of space on the stack. This is saying that the total data it contains and points to
must always be of the exact same size for every instance.
Provided Associated Constants§
const SERIALIZED_SIZE: usize = _
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.