Struct allsorts::tables::TableRecord
source · [−]Expand description
An entry in the Offset Table
https://docs.microsoft.com/en-us/typography/opentype/spec/otff#organization-of-an-opentype-font
Fields
table_tag: u32
checksum: u32
offset: u32
length: u32
Implementations
sourceimpl TableRecord
impl TableRecord
pub const SIZE: usize = 16usize
pub fn read_table<'a>(
&self,
scope: &ReadScope<'a>
) -> Result<ReadScope<'a>, ParseError>
Trait Implementations
sourceimpl Clone for TableRecord
impl Clone for TableRecord
sourcefn clone(&self) -> TableRecord
fn clone(&self) -> TableRecord
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 TableRecord
impl Debug for TableRecord
sourceimpl Hash for TableRecord
impl Hash for TableRecord
sourceimpl PartialEq<TableRecord> for TableRecord
impl PartialEq<TableRecord> for TableRecord
sourcefn eq(&self, other: &TableRecord) -> bool
fn eq(&self, other: &TableRecord) -> bool
sourceimpl PartialOrd<TableRecord> for TableRecord
impl PartialOrd<TableRecord> for TableRecord
sourcefn partial_cmp(&self, other: &TableRecord) -> Option<Ordering>
fn partial_cmp(&self, other: &TableRecord) -> 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> ReadFrom<'a> for TableRecord
impl<'a> ReadFrom<'a> for TableRecord
sourceimpl WriteBinary<&TableRecord> for TableRecord
impl WriteBinary<&TableRecord> for TableRecord
sourcefn write<C: WriteContext>(
ctxt: &mut C,
table: &TableRecord
) -> Result<(), WriteError>
fn write<C: WriteContext>(
ctxt: &mut C,
table: &TableRecord
) -> Result<(), WriteError>
Write the binary representation of Self to
ctxt
.impl Copy for TableRecord
impl StructuralPartialEq for TableRecord
Auto Trait Implementations
impl RefUnwindSafe for TableRecord
impl Send for TableRecord
impl Sync for TableRecord
impl Unpin for TableRecord
impl UnwindSafe for TableRecord
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> ReadBinary<'a> for Twhere
T: ReadUnchecked<'a>,
impl<'a, T> ReadBinary<'a> for Twhere
T: ReadUnchecked<'a>,
type HostType = <T as ReadUnchecked<'a>>::HostType
fn read(
ctxt: &mut ReadCtxt<'a>
) -> Result<<T as ReadBinary<'a>>::HostType, ParseError>
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<'a, T> ReadFixedSizeDep<'a> for Twhere
T: ReadUnchecked<'a>,
impl<'a, T> ReadFixedSizeDep<'a> for Twhere
T: ReadUnchecked<'a>,
sourceimpl<'a, T> ReadUnchecked<'a> for Twhere
T: ReadFrom<'a>,
impl<'a, T> ReadUnchecked<'a> for Twhere
T: ReadFrom<'a>,
type HostType = T
sourceunsafe fn read_unchecked(
ctxt: &mut ReadCtxt<'a>
) -> <T as ReadUnchecked<'a>>::HostType
unsafe fn read_unchecked(
ctxt: &mut ReadCtxt<'a>
) -> <T as ReadUnchecked<'a>>::HostType
Must read exactly
SIZE
bytes.
Unsafe as it avoids prohibitively expensive per-byte bounds checking. Read moresourceimpl<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
.