pub enum FieldType<'a> {
Show 22 variants I8(i8), U8(u8), I16(i16), U16(u16), I32(i32), U32(u32), U24(Uint24), Tag(Tag), FWord(FWord), UfWord(UfWord), MajorMinor(MajorMinor), Version16Dot16(Version16Dot16), F2Dot14(F2Dot14), Fixed(Fixed), LongDateTime(LongDateTime), GlyphId(GlyphId), BareOffset(OffsetType), ResolvedOffset(ResolvedOffset<'a>), StringOffset(StringOffset<'a>), Record(RecordResolver<'a>), ValueRecord(ValueRecord), Array(Box<dyn SomeArray<'a> + 'a>),
}
Expand description

Types of fields in font tables.

Fields can either be scalars, offsets to tables, or arrays.

Variants

I8(i8)

U8(u8)

I16(i16)

U16(u16)

I32(i32)

U32(u32)

U24(Uint24)

Tag(Tag)

FWord(FWord)

UfWord(UfWord)

MajorMinor(MajorMinor)

Version16Dot16(Version16Dot16)

F2Dot14(F2Dot14)

Fixed(Fixed)

LongDateTime(LongDateTime)

GlyphId(GlyphId)

BareOffset(OffsetType)

ResolvedOffset(ResolvedOffset<'a>)

StringOffset(StringOffset<'a>)

Used in tables like name/post so we can actually print the strings

Record(RecordResolver<'a>)

ValueRecord(ValueRecord)

Array(Box<dyn SomeArray<'a> + 'a>)

Implementations

makes a field, handling the case where this array may not be present in all versions

Convenience method for creating a FieldType from an array of offests.

The resolver argument is a function that takes an offset and resolves it.

Convenience method for creating a FieldType for a resolved offset.

This handles cases where offsets are nullable, in which case the result argument may be None.

Convenience method for creating a FieldType from an unknown offset.

Trait Implementations

Formats the value using the given formatter. Read more
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.