pub trait FixedSize: Sized {
const RAW_BYTE_LEN: usize;
}
Expand description
A trait for types that have a known, constant size.
Required Associated Constants§
sourceconst RAW_BYTE_LEN: usize
const RAW_BYTE_LEN: usize
The raw size of this type, in bytes.
This is the size required to represent this type in a font file, which may differ from the size of the native type:
assert_eq!(std::mem::size_of::<u16>(), u16::RAW_BYTE_LEN);
assert_eq!(Offset24::RAW_BYTE_LEN, 3);
assert_eq!(std::mem::size_of::<Offset24>(), 4);
Object Safety§
This trait is not object safe.