Trait ttf_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<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 PlatformId

source§

const SIZE: usize = 2usize

source§

impl FromData for Point

source§

const SIZE: usize = 4usize

source§

impl FromData for AxisValueMap

source§

const SIZE: usize = 4usize

source§

impl FromData for SettingName

source§

const SIZE: usize = 4usize

source§

impl FromData for VariationAxis

source§

const SIZE: usize = 20usize

source§

impl FromData for Metrics

source§

const SIZE: usize = 4usize

source§

impl FromData for KerningPair

source§

const SIZE: usize = 6usize

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 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 LookupFlags

source§

const SIZE: usize = 2usize

source§

impl FromData for RangeRecord

source§

const SIZE: usize = 6usize

source§

impl FromData for SequenceLookupRecord

source§

const SIZE: usize = 4usize

source§

impl FromData for Fixed

source§

const SIZE: usize = 4usize

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 VerticalOriginMetrics

source§

const SIZE: usize = 4usize

source§

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

source§

const SIZE: usize = _