Enum allsorts::tables::IndexToLocFormat
source · [−]pub enum IndexToLocFormat {
Short,
Long,
}
Expand description
The size of the offsets in the loca
table
https://docs.microsoft.com/en-us/typography/opentype/spec/loca
Variants
Short
Offsets are 16-bit. The actual local offset divided by 2 is stored.
Long
Offsets are 32-bit. The actual local offset is stored.
Trait Implementations
sourceimpl Clone for IndexToLocFormat
impl Clone for IndexToLocFormat
sourcefn clone(&self) -> IndexToLocFormat
fn clone(&self) -> IndexToLocFormat
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for IndexToLocFormat
impl Debug for IndexToLocFormat
sourceimpl Hash for IndexToLocFormat
impl Hash for IndexToLocFormat
sourceimpl Ord for IndexToLocFormat
impl Ord for IndexToLocFormat
sourcefn cmp(&self, other: &IndexToLocFormat) -> Ordering
fn cmp(&self, other: &IndexToLocFormat) -> Ordering
1.21.0 · sourceconst fn max(self, other: Self) -> Self
const fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourceconst fn min(self, other: Self) -> Self
const fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourceconst fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
const fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<IndexToLocFormat> for IndexToLocFormat
impl PartialEq<IndexToLocFormat> for IndexToLocFormat
sourcefn eq(&self, other: &IndexToLocFormat) -> bool
fn eq(&self, other: &IndexToLocFormat) -> bool
sourceimpl PartialOrd<IndexToLocFormat> for IndexToLocFormat
impl PartialOrd<IndexToLocFormat> for IndexToLocFormat
sourcefn partial_cmp(&self, other: &IndexToLocFormat) -> Option<Ordering>
fn partial_cmp(&self, other: &IndexToLocFormat) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresourceimpl<'a> ReadBinary<'a> for IndexToLocFormat
impl<'a> ReadBinary<'a> for IndexToLocFormat
type HostType = IndexToLocFormat
fn read(ctxt: &mut ReadCtxt<'a>) -> Result<Self, ParseError>
sourceimpl WriteBinary<IndexToLocFormat> for IndexToLocFormat
impl WriteBinary<IndexToLocFormat> for IndexToLocFormat
sourcefn write<C: WriteContext>(
ctxt: &mut C,
index_to_loc_format: Self
) -> Result<(), WriteError>
fn write<C: WriteContext>(
ctxt: &mut C,
index_to_loc_format: Self
) -> Result<(), WriteError>
Write the binary representation of Self to
ctxt
.impl Copy for IndexToLocFormat
impl Eq for IndexToLocFormat
impl StructuralEq for IndexToLocFormat
impl StructuralPartialEq for IndexToLocFormat
Auto Trait Implementations
impl RefUnwindSafe for IndexToLocFormat
impl Send for IndexToLocFormat
impl Sync for IndexToLocFormat
impl Unpin for IndexToLocFormat
impl UnwindSafe for IndexToLocFormat
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<'a, T> ReadBinaryDep<'a> for Twhere
T: ReadBinary<'a>,
impl<'a, T> ReadBinaryDep<'a> for Twhere
T: ReadBinary<'a>,
type Args = ()
type HostType = <T as ReadBinary<'a>>::HostType
fn read_dep(
ctxt: &mut ReadCtxt<'a>,
<T as ReadBinaryDep<'a>>::Args
) -> Result<<T as ReadBinaryDep<'a>>::HostType, ParseError>
sourceimpl<T, HostType> WriteBinaryDep<HostType> for Twhere
T: WriteBinary<HostType>,
impl<T, HostType> WriteBinaryDep<HostType> for Twhere
T: WriteBinary<HostType>,
type Output = <T as WriteBinary<HostType>>::Output
type Output = <T as WriteBinary<HostType>>::Output
The type of the value returned by
write_dep
.sourcefn write_dep<C>(
ctxt: &mut C,
val: HostType,
<T as WriteBinaryDep<HostType>>::Args
) -> Result<<T as WriteBinaryDep<HostType>>::Output, WriteError>where
C: WriteContext,
fn write_dep<C>(
ctxt: &mut C,
val: HostType,
<T as WriteBinaryDep<HostType>>::Args
) -> Result<<T as WriteBinaryDep<HostType>>::Output, WriteError>where
C: WriteContext,
Write the binary representation of Self to
ctxt
.