Enum allsorts_no_std::tables::cmap::CmapSubtable[][src]

pub enum CmapSubtable<'a> {
    Format0 {
        language: u16,
        glyph_id_array: ReadArray<'a, U8>,
    },
    Format2 {
        language: u16,
        sub_header_keys: ReadArray<'a, U16Be>,
        sub_headers: ReadArray<'a, SubHeader>,
        sub_headers_scope: ReadScope<'a>,
    },
    Format4 {
        language: u16,
        end_codes: ReadArray<'a, U16Be>,
        start_codes: ReadArray<'a, U16Be>,
        id_deltas: ReadArray<'a, I16Be>,
        id_range_offsets: ReadArray<'a, U16Be>,
        glyph_id_array: ReadArray<'a, U16Be>,
    },
    Format6 {
        language: u16,
        first_code: u16,
        glyph_id_array: ReadArray<'a, U16Be>,
    },
    Format10 {
        language: u32,
        start_char_code: u32,
        glyph_id_array: ReadArray<'a, U16Be>,
    },
    Format12 {
        language: u32,
        groups: ReadArray<'a, SequentialMapGroup>,
    },
}

Variants

Format0

Fields of Format0

language: u16glyph_id_array: ReadArray<'a, U8>
Format2

Fields of Format2

language: u16sub_header_keys: ReadArray<'a, U16Be>sub_headers: ReadArray<'a, SubHeader>sub_headers_scope: ReadScope<'a>
Format4

Fields of Format4

language: u16end_codes: ReadArray<'a, U16Be>start_codes: ReadArray<'a, U16Be>id_deltas: ReadArray<'a, I16Be>id_range_offsets: ReadArray<'a, U16Be>glyph_id_array: ReadArray<'a, U16Be>
Format6

Fields of Format6

language: u16first_code: u16glyph_id_array: ReadArray<'a, U16Be>
Format10

Fields of Format10

language: u32start_char_code: u32glyph_id_array: ReadArray<'a, U16Be>
Format12

Fields of Format12

language: u32groups: ReadArray<'a, SequentialMapGroup>

Implementations

impl<'a> CmapSubtable<'a>[src]

pub fn map_glyph(&self, ch: u32) -> Result<Option<u16>, ParseError>[src]

pub fn to_owned(&self) -> Option<OwnedCmapSubtable>[src]

Returns an owned::CmapSubtable. Will only return None if self is CmapSubtable::Format2 as support for converting from this format is not yet implemented.

Trait Implementations

impl<'a> ReadBinary<'a> for CmapSubtable<'a>[src]

type HostType = Self

impl<'a> WriteBinary<&'_ CmapSubtable<'a>> for CmapSubtable<'a>[src]

type Output = ()

The type of the value returned by write.

Auto Trait Implementations

impl<'a> RefUnwindSafe for CmapSubtable<'a>

impl<'a> Send for CmapSubtable<'a>

impl<'a> Sync for CmapSubtable<'a>

impl<'a> Unpin for CmapSubtable<'a>

impl<'a> UnwindSafe for CmapSubtable<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<'a, T> ReadBinaryDep<'a> for T where
    T: ReadBinary<'a>, 
[src]

type Args = ()

type HostType = <T as ReadBinary<'a>>::HostType

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T, HostType> WriteBinaryDep<HostType> for T where
    T: WriteBinary<HostType>, 
[src]

type Args = ()

The type of the arguments supplied to write_dep.

type Output = <T as WriteBinary<HostType>>::Output

The type of the value returned by write_dep.