Trait ttf_parser::parser::FromData

source ·
pub trait FromData: Sized {
    const SIZE: usize;

    // Required method
    fn parse(data: &[u8]) -> Option<Self>;
}
Expand description

A trait for parsing raw binary data of fixed size.

This is a low-level, internal trait that should not be used directly.

Required Associated Constants§

source

const SIZE: usize

Object’s raw data size.

Not always the same as mem::size_of.

Required Methods§

source

fn parse(data: &[u8]) -> Option<Self>

Parses an object from a raw data.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl FromData for Option<Offset16>

source§

const SIZE: usize = 2usize

source§

fn parse(data: &[u8]) -> Option<Self>

source§

impl FromData for Option<Offset24>

source§

const SIZE: usize = 3usize

source§

fn parse(data: &[u8]) -> Option<Self>

source§

impl FromData for Option<Offset32>

source§

const SIZE: usize = 4usize

source§

fn parse(data: &[u8]) -> Option<Self>

source§

impl FromData for i8

source§

const SIZE: usize = 1usize

source§

fn parse(data: &[u8]) -> Option<Self>

source§

impl FromData for i16

source§

const SIZE: usize = 2usize

source§

fn parse(data: &[u8]) -> Option<Self>

source§

impl FromData for i32

source§

const SIZE: usize = 4usize

source§

fn parse(data: &[u8]) -> Option<Self>

source§

impl FromData for u8

source§

const SIZE: usize = 1usize

source§

fn parse(data: &[u8]) -> Option<Self>

source§

impl FromData for u16

source§

const SIZE: usize = 2usize

source§

fn parse(data: &[u8]) -> Option<Self>

source§

impl FromData for u32

source§

const SIZE: usize = 4usize

source§

fn parse(data: &[u8]) -> Option<Self>

source§

impl FromData for u64

source§

const SIZE: usize = 8usize

source§

fn parse(data: &[u8]) -> Option<Self>

source§

impl FromData for ()

source§

const SIZE: usize = 0usize

source§

fn parse(_: &[u8]) -> Option<Self>

Implementors§

source§

impl FromData for Magic

source§

const SIZE: usize = 4usize

source§

impl FromData for OffsetSize

source§

const SIZE: usize = 1usize

source§

impl FromData for CompositeMode

source§

const SIZE: usize = 1usize

source§

impl FromData for GradientExtend

source§

const SIZE: usize = 1usize

source§

impl FromData for PlatformId

source§

const SIZE: usize = 2usize

source§

impl FromData for LookupSegment

source§

const SIZE: usize = 6usize

source§

impl FromData for LookupSingle

source§

const SIZE: usize = 4usize

source§

impl FromData for SequenceLookupRecord

source§

const SIZE: usize = 4usize

source§

impl FromData for FeatureTableSubstitutionRecord

source§

const SIZE: usize = 6usize

source§

impl FromData for FeatureVariationRecord

source§

const SIZE: usize = 8usize

source§

impl FromData for TagRecord

source§

const SIZE: usize = 6usize

source§

impl FromData for LookupFlags

source§

const SIZE: usize = 2usize

source§

impl FromData for RangeRecord

source§

const SIZE: usize = 6usize

source§

impl FromData for GlyphId

source§

const SIZE: usize = 2usize

source§

impl FromData for TableRecord

source§

const SIZE: usize = 16usize

source§

impl FromData for Tag

source§

const SIZE: usize = 4usize

source§

impl FromData for Point

source§

const SIZE: usize = 4usize

source§

impl FromData for AxisValueMap

source§

const SIZE: usize = 4usize

source§

impl FromData for GlyphIdOffsetPair

source§

const SIZE: usize = 4usize

source§

impl FromData for ttf_parser::tables::cff::charset::Format1Range

source§

const SIZE: usize = 3usize

source§

impl FromData for Format2Range

source§

const SIZE: usize = 4usize

source§

impl FromData for ttf_parser::tables::cff::encoding::Format1Range

source§

const SIZE: usize = 2usize

source§

impl FromData for Supplement

source§

const SIZE: usize = 3usize

source§

impl FromData for StringId

source§

const SIZE: usize = 2usize

source§

impl FromData for SubHeaderRecord

source§

const SIZE: usize = 8usize

source§

impl FromData for SequentialMapGroup

source§

const SIZE: usize = 12usize

source§

impl FromData for UVSMappingRecord

source§

const SIZE: usize = 5usize

source§

impl FromData for UnicodeRangeRecord

source§

const SIZE: usize = 4usize

source§

impl FromData for VariationSelectorRecord

source§

const SIZE: usize = 11usize

source§

impl FromData for EncodingRecord

source§

const SIZE: usize = 8usize

source§

impl FromData for BaseGlyphPaintRecord

source§

const SIZE: usize = 6usize

source§

impl FromData for BaseGlyphRecord

source§

const SIZE: usize = 6usize

source§

impl FromData for ClipRecord

source§

const SIZE: usize = 7usize

source§

impl FromData for ColorStopRaw

source§

const SIZE: usize = 6usize

source§

impl FromData for LayerRecord

source§

const SIZE: usize = 4usize

source§

impl FromData for VarColorStopRaw

source§

const SIZE: usize = 10usize

source§

impl FromData for BgraColor

source§

const SIZE: usize = 4usize

source§

impl FromData for FeatureNameRecord

source§

const SIZE: usize = 12usize

source§

impl FromData for SettingName

source§

const SIZE: usize = 4usize

source§

impl FromData for VariationAxis

source§

const SIZE: usize = 20usize

source§

impl FromData for EntryExitRecord

source§

const SIZE: usize = 4usize

source§

impl FromData for MarkRecord

source§

const SIZE: usize = 4usize

source§

impl FromData for ValueFormatFlags

source§

const SIZE: usize = 2usize

source§

impl FromData for Control

source§

const SIZE: usize = 1usize

source§

impl FromData for Metrics

source§

const SIZE: usize = 4usize

source§

impl FromData for AATCoverage

source§

const SIZE: usize = 1usize

source§

impl FromData for KerningPair

source§

const SIZE: usize = 6usize

source§

impl FromData for OTCoverage

source§

const SIZE: usize = 1usize

source§

impl FromData for EntryData

source§

const SIZE: usize = 2usize

source§

impl FromData for GlyphPart

source§

const SIZE: usize = 10usize

source§

impl FromData for GlyphVariant

source§

const SIZE: usize = 4usize

source§

impl FromData for KernInfoRecord

source§

const SIZE: usize = 8usize

source§

impl FromData for MathValueRecord

source§

const SIZE: usize = 4usize

source§

impl FromData for PartFlags

source§

const SIZE: usize = 2usize

source§

impl FromData for ContextualEntryData

source§

const SIZE: usize = 4usize

source§

impl FromData for Feature

source§

const SIZE: usize = 12usize

source§

impl FromData for InsertionEntryData

source§

const SIZE: usize = 4usize

source§

impl FromData for ValueRecord

source§

const SIZE: usize = 8usize

source§

impl FromData for NameRecord

source§

const SIZE: usize = 12usize

source§

impl FromData for AxisRecord

source§

const SIZE: usize = 8usize

source§

impl FromData for AxisValue

source§

const SIZE: usize = 6usize

source§

impl FromData for AxisValueSubtableFormat1

source§

const SIZE: usize = 10usize

source§

impl FromData for AxisValueSubtableFormat2

source§

const SIZE: usize = 18usize

source§

impl FromData for AxisValueSubtableFormat3

source§

const SIZE: usize = 14usize

source§

impl FromData for SvgDocumentRecord

source§

const SIZE: usize = 12usize

source§

impl FromData for TrackTableRecord

source§

const SIZE: usize = 8usize

source§

impl FromData for VerticalOriginMetrics

source§

const SIZE: usize = 4usize

source§

impl FromData for RegionAxisCoordinatesRecord

source§

const SIZE: usize = 6usize

source§

impl FromData for F2DOT14

source§

const SIZE: usize = 2usize

source§

impl FromData for Fixed

source§

const SIZE: usize = 4usize

source§

impl FromData for Offset16

source§

const SIZE: usize = 2usize

source§

impl FromData for Offset24

source§

const SIZE: usize = 3usize

source§

impl FromData for Offset32

source§

const SIZE: usize = 4usize

source§

impl FromData for U24

source§

const SIZE: usize = 3usize

source§

impl<T: FromData> FromData for GenericStateEntry<T>

source§

const SIZE: usize = _