Trait FixedSize

pub trait FixedSize: Sized {
    const RAW_BYTE_LEN: usize;
}
Expand description

A trait for types that have a known, constant size.

Required Associated Constants§

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);

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.

Implementors§

§

impl FixedSize for ColorRecord

§

const RAW_BYTE_LEN: usize = 4usize

§

impl FixedSize for TableRecord

§

const RAW_BYTE_LEN: usize = 16usize

§

impl FixedSize for LookupSegment4

§

const RAW_BYTE_LEN: usize = 6usize

§

impl FixedSize for NoPayload

§

const RAW_BYTE_LEN: usize = 0usize

§

impl FixedSize for AnchorPoint

§

const RAW_BYTE_LEN: usize = 4usize

§

impl FixedSize for AxisValueMap

§

const RAW_BYTE_LEN: usize = 4usize

§

impl FixedSize for BaseLangSysRecord

§

const RAW_BYTE_LEN: usize = 6usize

§

impl FixedSize for BaseScriptRecord

§

const RAW_BYTE_LEN: usize = 6usize

§

impl FixedSize for FeatMinMaxRecord

§

const RAW_BYTE_LEN: usize = 8usize

§

impl FixedSize for BdtComponent

§

const RAW_BYTE_LEN: usize = 4usize

§

impl FixedSize for BigGlyphMetrics

§

const RAW_BYTE_LEN: usize = 8usize

§

impl FixedSize for BitmapSize

§

const RAW_BYTE_LEN: usize = 48usize

§

impl FixedSize for GlyphIdOffsetPair

§

const RAW_BYTE_LEN: usize = 4usize

§

impl FixedSize for IndexSubtableRecord

§

const RAW_BYTE_LEN: usize = 8usize

§

impl FixedSize for SbitLineMetrics

§

const RAW_BYTE_LEN: usize = 12usize

§

impl FixedSize for SmallGlyphMetrics

§

const RAW_BYTE_LEN: usize = 5usize

§

impl FixedSize for ConstantMapGroup

§

const RAW_BYTE_LEN: usize = 12usize

§

impl FixedSize for EncodingRecord

§

const RAW_BYTE_LEN: usize = 8usize

§

impl FixedSize for SequentialMapGroup

§

const RAW_BYTE_LEN: usize = 12usize

§

impl FixedSize for SubHeader

§

const RAW_BYTE_LEN: usize = 8usize

§

impl FixedSize for UnicodeRange

§

const RAW_BYTE_LEN: usize = 4usize

§

impl FixedSize for UvsMapping

§

const RAW_BYTE_LEN: usize = 5usize

§

impl FixedSize for VariationSelector

§

const RAW_BYTE_LEN: usize = 11usize

§

impl FixedSize for BaseGlyph

§

const RAW_BYTE_LEN: usize = 6usize

§

impl FixedSize for BaseGlyphPaint

§

const RAW_BYTE_LEN: usize = 6usize

§

impl FixedSize for Clip

§

const RAW_BYTE_LEN: usize = 7usize

§

impl FixedSize for ColorIndex

§

const RAW_BYTE_LEN: usize = 4usize

§

impl FixedSize for ColorStop

§

const RAW_BYTE_LEN: usize = 6usize

§

impl FixedSize for Layer

§

const RAW_BYTE_LEN: usize = 4usize

§

impl FixedSize for VarColorIndex

§

const RAW_BYTE_LEN: usize = 8usize

§

impl FixedSize for VarColorStop

§

const RAW_BYTE_LEN: usize = 10usize

§

impl FixedSize for SignatureRecord

§

const RAW_BYTE_LEN: usize = 12usize

§

impl FixedSize for FeatureName

§

const RAW_BYTE_LEN: usize = 12usize

§

impl FixedSize for SettingName

§

const RAW_BYTE_LEN: usize = 4usize

§

impl FixedSize for VariationAxisRecord

§

const RAW_BYTE_LEN: usize = 20usize

§

impl FixedSize for GaspRange

§

const RAW_BYTE_LEN: usize = 4usize

§

impl FixedSize for EntryExitRecord

§

const RAW_BYTE_LEN: usize = 4usize

§

impl FixedSize for MarkRecord

§

const RAW_BYTE_LEN: usize = 4usize

§

impl FixedSize for LongMetric

§

const RAW_BYTE_LEN: usize = 4usize

§

impl FixedSize for Subtable0Pair

§

const RAW_BYTE_LEN: usize = 6usize

§

impl FixedSize for ClassRangeRecord

§

const RAW_BYTE_LEN: usize = 6usize

§

impl FixedSize for FeatureRecord

§

const RAW_BYTE_LEN: usize = 6usize

§

impl FixedSize for FeatureTableSubstitutionRecord

§

const RAW_BYTE_LEN: usize = 6usize

§

impl FixedSize for FeatureVariationRecord

§

const RAW_BYTE_LEN: usize = 8usize

§

impl FixedSize for LangSysRecord

§

const RAW_BYTE_LEN: usize = 6usize

§

impl FixedSize for RangeRecord

§

const RAW_BYTE_LEN: usize = 6usize

§

impl FixedSize for ScriptRecord

§

const RAW_BYTE_LEN: usize = 6usize

§

impl FixedSize for SequenceLookupRecord

§

const RAW_BYTE_LEN: usize = 4usize

§

impl FixedSize for FTStringRange

§

const RAW_BYTE_LEN: usize = 4usize

§

impl FixedSize for DataMapRecord

§

const RAW_BYTE_LEN: usize = 12usize

§

impl FixedSize for ContextualEntryData

§

const RAW_BYTE_LEN: usize = 4usize

§

impl FixedSize for Feature

§

const RAW_BYTE_LEN: usize = 12usize

§

impl FixedSize for InsertionEntryData

§

const RAW_BYTE_LEN: usize = 4usize

§

impl FixedSize for ValueRecord

§

const RAW_BYTE_LEN: usize = 8usize

§

impl FixedSize for LangTagRecord

§

const RAW_BYTE_LEN: usize = 4usize

§

impl FixedSize for NameRecord

§

const RAW_BYTE_LEN: usize = 12usize

§

impl FixedSize for CharsetRange1

§

const RAW_BYTE_LEN: usize = 3usize

§

impl FixedSize for CharsetRange2

§

const RAW_BYTE_LEN: usize = 4usize

§

impl FixedSize for FdSelectRange3

§

const RAW_BYTE_LEN: usize = 3usize

§

impl FixedSize for FdSelectRange4

§

const RAW_BYTE_LEN: usize = 6usize

§

impl FixedSize for AxisRecord

§

const RAW_BYTE_LEN: usize = 8usize

§

impl FixedSize for AxisValueRecord

§

const RAW_BYTE_LEN: usize = 6usize

§

impl FixedSize for SVGDocumentRecord

§

const RAW_BYTE_LEN: usize = 12usize

§

impl FixedSize for TrackTableEntry

§

const RAW_BYTE_LEN: usize = 8usize

§

impl FixedSize for SparseRegionAxisCoordinates

§

const RAW_BYTE_LEN: usize = 8usize

§

impl FixedSize for RegionAxisCoordinates

§

const RAW_BYTE_LEN: usize = 6usize

§

impl FixedSize for VertOriginYMetrics

§

const RAW_BYTE_LEN: usize = 4usize

§

impl<T> FixedSize for LookupSegment2<T>
where T: LookupValue,

Note: this requires LookupSegment2 to be repr(packed).

§

impl<T> FixedSize for LookupSingle<T>
where T: LookupValue,

Note: this requires LookupSingle to be repr(packed).

§

impl<T> FixedSize for StateEntry<T>
where T: FixedSize,

§

impl<T> FixedSize for BigEndian<T>
where T: Scalar,

§

const RAW_BYTE_LEN: usize = T::RAW_BYTE_LEN

§

impl<T> FixedSize for T
where T: Scalar,