pub trait FixedSize {
const SIZE: usize;
}
Expand description
Trait for types with a known, fixed encoded size.
Implementing this trait signifies that the encoded representation of this type always has the same byte length, regardless of the specific value.
This automatically provides an implementation of EncodeSize.
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.