pub trait Scalar: Sized {
type Raw: BeByteArray;
// Required methods
fn from_raw(raw: Self::Raw) -> Self;
fn to_raw(self) -> Self::Raw;
// Provided method
fn read(slice: &[u8]) -> Option<Self> { ... }
}
Expand description
A trait for font scalars.
This is an internal trait for encoding and decoding big-endian bytes.
You do not need to implement this trait directly; it is an implementation
detail of the BigEndian
wrapper.
Required Associated Types§
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.