pub struct TypefaceId {
pub file_name: String,
pub index: u32,
}Expand description
Reference to a typeface, for use in specifying a fallback order.
Fields§
§file_name: StringFile name of the asset.
index: u32Index of the typeface in the file.
It is important to allow selecting specific indices rather than including all of the file’s indices in order because some files can contain typefaces from multiple font families, and a product owner may wish to assign them different priorities in the fallback chain.
Implementations§
Trait Implementations§
Source§impl Clone for TypefaceId
impl Clone for TypefaceId
Source§fn clone(&self) -> TypefaceId
fn clone(&self) -> TypefaceId
Returns a duplicate of the value. Read more
1.0.0 · 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 TypefaceId
impl Debug for TypefaceId
Source§impl<'de> Deserialize<'de> for TypefaceId
impl<'de> Deserialize<'de> for TypefaceId
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
Source§impl Hash for TypefaceId
impl Hash for TypefaceId
Source§impl Ord for TypefaceId
impl Ord for TypefaceId
Source§fn cmp(&self, other: &TypefaceId) -> Ordering
fn cmp(&self, other: &TypefaceId) -> Ordering
1.21.0 · 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 TypefaceId
impl PartialEq for TypefaceId
Source§impl PartialOrd for TypefaceId
impl PartialOrd for TypefaceId
Source§impl Serialize for TypefaceId
impl Serialize for TypefaceId
impl Eq for TypefaceId
impl StructuralPartialEq for TypefaceId
Auto Trait Implementations§
impl Freeze for TypefaceId
impl RefUnwindSafe for TypefaceId
impl Send for TypefaceId
impl Sync for TypefaceId
impl Unpin for TypefaceId
impl UnwindSafe for TypefaceId
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,
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more