pub trait Fixed {
const SIZE: usize;
}Expand description
Fixed is a trait is defining a single element representing a size of a constant.
This is useful for primitives with a constant fixed size
Types implementing this trait must define the constant SIZE, representing the
fixed number of bytes needed to encode or decode the type. This trait is used for
types that have a know size at compile time , such as integers, fixed-size arrays, etc.
Required Associated Constants§
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.