Enum ttf_parser::tables::gvar::VariationTuples

source ·
enum VariationTuples<'a> {
    Stack {
        headers: [VariationTuple<'a>; 32],
        len: u16,
    },
}
Expand description

A list of variation tuples, possibly stored on the heap.

This is the only part of the gvar algorithm that actually allocates a data. This is probably unavoidable due to gvar structure, since we have to iterate all tuples in parallel.

Variants§

§

Stack

Fields

§headers: [VariationTuple<'a>; 32]
§len: u16

Implementations§

source§

impl<'a> VariationTuples<'a>

source

fn reserve(&mut self, capacity: u16) -> bool

Attempt to reserve up to capacity total slots for variation tuples.

source

fn len(&self) -> u16

Get the number of tuples stored in the structure.

source

fn push(&mut self, header: VariationTuple<'a>)

Append a new tuple header to the list. This may panic if the list can’t hold a new header.

source

fn clear(&mut self)

Remove all tuples from the structure.

source

fn as_mut_slice(&mut self) -> &mut [VariationTuple<'a>]

source

fn apply( &mut self, all_points: GlyphPointsIter<'_>, points: GlyphPointsIter<'_>, point: GlyphPoint, ) -> Option<PointF>

source

fn apply_null(&mut self) -> Option<PointF>

Trait Implementations§

source§

impl<'a> Default for VariationTuples<'a>

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for VariationTuples<'a>

§

impl<'a> RefUnwindSafe for VariationTuples<'a>

§

impl<'a> Send for VariationTuples<'a>

§

impl<'a> Sync for VariationTuples<'a>

§

impl<'a> Unpin for VariationTuples<'a>

§

impl<'a> UnwindSafe for VariationTuples<'a>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.