read_fonts

Trait FontReadWithArgs

source
pub trait FontReadWithArgs<'a>: Sized + ReadArgs {
    // Required method
    fn read_with_args(
        data: FontData<'a>,
        args: &Self::Args,
    ) -> Result<Self, ReadError>;
}
Expand description

A trait for types that require external data in order to be constructed.

You should not need to use this directly; it is intended to be used from generated code. Any type that requires external arguments also has a custom read constructor where you can pass those arguments like normal.

Required Methods§

source

fn read_with_args( data: FontData<'a>, args: &Self::Args, ) -> Result<Self, ReadError>

read an item, using the provided args.

If successful, returns a new item of this type, and the number of bytes used to construct it.

If a type requires multiple arguments, they will be passed as a tuple.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'a, T: AnyBitPattern + FixedSize> FontReadWithArgs<'a> for &'a [T]

source§

fn read_with_args(data: FontData<'a>, args: &u16) -> Result<Self, ReadError>

Implementors§

source§

impl FontReadWithArgs<'_> for U16Or32

source§

impl FontReadWithArgs<'_> for IdDeltaOrLength

source§

impl FontReadWithArgs<'_> for U8Or16

source§

impl<'a> FontReadWithArgs<'a> for FeatureParams<'a>

source§

impl<'a> FontReadWithArgs<'a> for Loca<'a>

source§

impl<'a> FontReadWithArgs<'a> for InstanceRecord<'a>

source§

impl<'a> FontReadWithArgs<'a> for BaseRecord<'a>

source§

impl<'a> FontReadWithArgs<'a> for Class1Record<'a>

source§

impl<'a> FontReadWithArgs<'a> for Class2Record

source§

impl<'a> FontReadWithArgs<'a> for ComponentRecord<'a>

source§

impl<'a> FontReadWithArgs<'a> for Mark2Record<'a>

source§

impl<'a> FontReadWithArgs<'a> for PairValueRecord

source§

impl<'a> FontReadWithArgs<'a> for ValueRecord

source§

impl<'a> FontReadWithArgs<'a> for DeviceRecord<'a>

source§

impl<'a> FontReadWithArgs<'a> for EntryMapRecord

source§

impl<'a> FontReadWithArgs<'a> for FeatureRecord

source§

impl<'a> FontReadWithArgs<'a> for Tuple<'a>

source§

impl<'a> FontReadWithArgs<'a> for VariationRegion<'a>

source§

impl<'a> FontReadWithArgs<'a> for SettingNameArray<'a>

source§

impl<'a> FontReadWithArgs<'a> for AxisInstanceArrays<'a>

source§

impl<'a> FontReadWithArgs<'a> for BaseArray<'a>

source§

impl<'a> FontReadWithArgs<'a> for LigatureArray<'a>

source§

impl<'a> FontReadWithArgs<'a> for LigatureAttach<'a>

source§

impl<'a> FontReadWithArgs<'a> for Mark2Array<'a>

source§

impl<'a> FontReadWithArgs<'a> for PairSet<'a>

source§

impl<'a> FontReadWithArgs<'a> for SharedTuples<'a>

source§

impl<'a> FontReadWithArgs<'a> for Hdmx<'a>

source§

impl<'a> FontReadWithArgs<'a> for Hmtx<'a>

source§

impl<'a> FontReadWithArgs<'a> for EntryData<'a>

source§

impl<'a> FontReadWithArgs<'a> for FeatureMap<'a>

source§

impl<'a> FontReadWithArgs<'a> for GlyphMap<'a>

source§

impl<'a> FontReadWithArgs<'a> for Feature<'a>

source§

impl<'a> FontReadWithArgs<'a> for Sbix<'a>

source§

impl<'a> FontReadWithArgs<'a> for Strike<'a>

source§

impl<'a> FontReadWithArgs<'a> for AxisValueArray<'a>

source§

impl<'a> FontReadWithArgs<'a> for TupleVariationHeader<'a>

source§

impl<'a> FontReadWithArgs<'a> for Vmtx<'a>

source§

impl<'a, T> FontReadWithArgs<'a> for ComputedArray<'a, T>
where T: ComputeSize + FontReadWithArgs<'a>, T::Args: Copy,

source§

impl<'a, T: FontRead<'a>> FontReadWithArgs<'a> for T