pub enum DeviceOrDeltas {
Device(Device),
Deltas(Vec<(VariationRegion, i16)>),
None,
}Available on crate feature
tables only.Expand description
Either a Device table or a set of deltas.
This stores deltas directly; during compilation, the deltas are bundled
into some ItemVariationStore, and referenced by a VariationIndex.
Variants§
Implementations§
Source§impl DeviceOrDeltas
impl DeviceOrDeltas
Sourcepub fn build(
self,
var_store: &mut VariationStoreBuilder,
) -> Option<DeviceOrVariationIndex>
pub fn build( self, var_store: &mut VariationStoreBuilder, ) -> Option<DeviceOrVariationIndex>
Compile the device or deltas into their final form.
In the case of a device, this generates a Device table; in the
case of deltas this adds them to the VariationStoreBuilder, and returns
a PendingVariationIndex that must be remapped after the builder is
finished, using the returned VariationIndexRemapping.
Trait Implementations§
Source§impl Clone for DeviceOrDeltas
impl Clone for DeviceOrDeltas
Source§fn clone(&self) -> DeviceOrDeltas
fn clone(&self) -> DeviceOrDeltas
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 DeviceOrDeltas
impl Debug for DeviceOrDeltas
Source§impl Default for DeviceOrDeltas
impl Default for DeviceOrDeltas
Source§fn default() -> DeviceOrDeltas
fn default() -> DeviceOrDeltas
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for DeviceOrDeltas
impl<'de> Deserialize<'de> for DeviceOrDeltas
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for DeviceOrDeltas
Source§impl From<Device> for DeviceOrDeltas
impl From<Device> for DeviceOrDeltas
Source§impl From<Vec<(VariationRegion, i16)>> for DeviceOrDeltas
impl From<Vec<(VariationRegion, i16)>> for DeviceOrDeltas
Source§fn from(src: Vec<(VariationRegion, i16)>) -> DeviceOrDeltas
fn from(src: Vec<(VariationRegion, i16)>) -> DeviceOrDeltas
Converts to this type from the input type.
Source§impl Ord for DeviceOrDeltas
impl Ord for DeviceOrDeltas
Source§fn cmp(&self, other: &DeviceOrDeltas) -> Ordering
fn cmp(&self, other: &DeviceOrDeltas) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for DeviceOrDeltas
impl PartialEq for DeviceOrDeltas
Source§fn eq(&self, other: &DeviceOrDeltas) -> bool
fn eq(&self, other: &DeviceOrDeltas) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for DeviceOrDeltas
impl PartialOrd for DeviceOrDeltas
Source§impl Serialize for DeviceOrDeltas
impl Serialize for DeviceOrDeltas
impl StructuralPartialEq for DeviceOrDeltas
Auto Trait Implementations§
impl Freeze for DeviceOrDeltas
impl RefUnwindSafe for DeviceOrDeltas
impl Send for DeviceOrDeltas
impl Sync for DeviceOrDeltas
impl Unpin for DeviceOrDeltas
impl UnsafeUnpin for DeviceOrDeltas
impl UnwindSafe for DeviceOrDeltas
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Available on crate feature
tables only.Convert this type into
T, using the provided data to resolve any offsets.Source§impl<U, T> ToOwnedTable<U> for Twhere
U: FromTableRef<T>,
impl<U, T> ToOwnedTable<U> for Twhere
U: FromTableRef<T>,
Source§fn to_owned_table(&self) -> U
fn to_owned_table(&self) -> U
Available on crate feature
tables only.