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 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl 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
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &TableRecord) -> bool
fn ne(&self, other: &TableRecord) -> bool
This method tests for !=
.
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>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
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 more
sourceimpl<'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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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 T where
T: ReadUnchecked<'a>,
impl<'a, T> ReadBinary<'a> for T where
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 T where
T: ReadBinary<'a>,
impl<'a, T> ReadBinaryDep<'a> for T where
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 T where
T: ReadUnchecked<'a>,
impl<'a, T> ReadFixedSizeDep<'a> for T where
T: ReadUnchecked<'a>,
sourceimpl<'a, T> ReadUnchecked<'a> for T where
T: ReadFrom<'a>,
impl<'a, T> ReadUnchecked<'a> for T where
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 more
sourceimpl<T, HostType> WriteBinaryDep<HostType> for T where
T: WriteBinary<HostType>,
impl<T, HostType> WriteBinaryDep<HostType> for T where
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
.