Trait write_fonts::from_obj::FromObjRef
source · pub trait FromObjRef<T: ?Sized>: Sized {
// Required method
fn from_obj_ref(from: &T, data: FontData<'_>) -> Self;
}Expand description
A trait for types that can resolve themselves when provided data to resolve offsets.
It is possible that the generated object is malformed; for instance offsets
may be null where it is not allowed. This can be checked by calling validate
on the generated object.
This is implemented for the majority of parse types. Those that are the base for offset data ignore the provided data and use their own.
Required Methods§
sourcefn from_obj_ref(from: &T, data: FontData<'_>) -> Self
fn from_obj_ref(from: &T, data: FontData<'_>) -> Self
Convert from to an instance of Self, using the provided data to resolve offsets.
Object Safety§
This trait is not object safe.