pub struct StatTable<'a> { /* private fields */ }Expand description
Zero-copy view over the stat table.
Implementations§
Source§impl<'a> StatTable<'a>
impl<'a> StatTable<'a>
Sourcepub fn parse(data: &'a [u8]) -> Result<Self, ParseError>
pub fn parse(data: &'a [u8]) -> Result<Self, ParseError>
Parse and validate the stat header.
§Errors
ParseError::TruncatedTable for short headers;
ParseError::InvalidGlyphFormat for inconsistent sizes.
Sourcepub fn design_axes(&self) -> Result<Vec<StatAxis>, ParseError>
pub fn design_axes(&self) -> Result<Vec<StatAxis>, ParseError>
Sourcepub fn axis_values(&self) -> Result<Vec<AxisValue>, ParseError>
pub fn axis_values(&self) -> Result<Vec<AxisValue>, ParseError>
Axis-value tables.
§Errors
ParseError::TruncatedTable / ParseError::InvalidGlyphFormat
for malformed value tables.
Sourcepub fn elided_fallback_name_id(&self) -> Result<u16, ParseError>
pub fn elided_fallback_name_id(&self) -> Result<u16, ParseError>
Trait Implementations§
impl<'a> Copy for StatTable<'a>
impl<'a> Eq for StatTable<'a>
impl<'a> StructuralPartialEq for StatTable<'a>
Auto Trait Implementations§
impl<'a> Freeze for StatTable<'a>
impl<'a> RefUnwindSafe for StatTable<'a>
impl<'a> Send for StatTable<'a>
impl<'a> Sync for StatTable<'a>
impl<'a> Unpin for StatTable<'a>
impl<'a> UnsafeUnpin for StatTable<'a>
impl<'a> UnwindSafe for StatTable<'a>
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