#[repr(C, packed(1))]pub struct DataMapRecord {
pub tag: BigEndian<Tag>,
pub data_offset: BigEndian<Offset32>,
pub data_length: BigEndian<u32>,
}
Fields§
§tag: BigEndian<Tag>
A tag indicating the type of metadata.
data_offset: BigEndian<Offset32>
Offset in bytes from the beginning of the metadata table to the data for this tag.
data_length: BigEndian<u32>
Length of the data, in bytes. The data is not required to be padded to any byte boundary.
Implementations§
Source§impl DataMapRecord
impl DataMapRecord
Sourcepub fn data_offset(&self) -> Offset32
pub fn data_offset(&self) -> Offset32
Offset in bytes from the beginning of the metadata table to the data for this tag.
Sourcepub fn data<'a>(&self, data: FontData<'a>) -> Result<Metadata<'a>, ReadError>
pub fn data<'a>(&self, data: FontData<'a>) -> Result<Metadata<'a>, ReadError>
Offset in bytes from the beginning of the metadata table to the data for this tag.
The data
argument should be retrieved from the parent table
By calling its offset_data
method.
Sourcepub fn data_length(&self) -> u32
pub fn data_length(&self) -> u32
Length of the data, in bytes. The data is not required to be padded to any byte boundary.
Trait Implementations§
Source§impl Clone for DataMapRecord
impl Clone for DataMapRecord
Source§fn clone(&self) -> DataMapRecord
fn clone(&self) -> DataMapRecord
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for DataMapRecord
impl Debug for DataMapRecord
Source§impl FixedSize for DataMapRecord
impl FixedSize for DataMapRecord
Source§const RAW_BYTE_LEN: usize = 12usize
const RAW_BYTE_LEN: usize = 12usize
The raw size of this type, in bytes. Read more
impl AnyBitPattern for DataMapRecord
impl Copy for DataMapRecord
Auto Trait Implementations§
impl Freeze for DataMapRecord
impl RefUnwindSafe for DataMapRecord
impl Send for DataMapRecord
impl Sync for DataMapRecord
impl Unpin for DataMapRecord
impl UnwindSafe for DataMapRecord
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self
must have the same layout as the specified Bits
except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern
.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self
.