pub struct Tag(pub [u8; 4]);Expand description
A four-byte OpenType tag (Tag).
fontTools represents tags as str decoded from Latin-1; here they are the raw
bytes. Ordering is bytewise, which matches sorting the Latin-1 strings.
Tuple Fields§
§0: [u8; 4]Implementations§
Source§impl Tag
impl Tag
Sourcepub fn from_str_padded(s: &str) -> Option<Self>
pub fn from_str_padded(s: &str) -> Option<Self>
Creates a tag from a string of up to four Latin-1 characters, padded with
spaces. Returns None if the string is too long or not Latin-1.
Sourcepub fn from_str_exact(s: &str) -> Option<Self>
pub fn from_str_exact(s: &str) -> Option<Self>
Creates a tag from a string of exactly four Latin-1 characters.
Trait Implementations§
impl Copy for Tag
impl Eq for Tag
Source§impl Ord for Tag
impl Ord for Tag
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Tag
impl PartialOrd for Tag
impl StructuralPartialEq for Tag
Auto Trait Implementations§
impl Forget for Tag
impl Freeze for Tag
impl Move for Tag
impl RefUnwindSafe for Tag
impl Send for Tag
impl Sync for Tag
impl Unpin for Tag
impl UnsafeUnpin for Tag
impl UnwindSafe for Tag
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
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.