pub trait FontReadAt<'a>: Sized + ReadArgs {
// Required method
fn read_at(
data: FontData<'a>,
offset: usize,
args: Self::Args,
) -> Result<Self, ReadError>;
}Expand description
A trait for types that are read at a position within enclosing data.
FontRead receives data already sliced to the start of the item, which
discards everything before it. That is the wrong shape for an item holding
offsets that resolve relative to the enclosing table rather than to the item
itself: a GPOS value record’s device offsets are measured from the start of
the table containing the record. Such a type is given the enclosing data and
its own position within it, and keeps both.
You should not generally need to call this directly; it is intended to be used from generated code.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".