Struct ttf_parser::Tag
source · [−]#[repr(transparent)]pub struct Tag(pub u32);
Expand description
A 4-byte tag.
Tuple Fields
0: u32
Implementations
sourceimpl Tag
impl Tag
sourcepub const fn from_bytes(bytes: &[u8; 4]) -> Self
pub const fn from_bytes(bytes: &[u8; 4]) -> Self
sourcepub fn from_bytes_lossy(bytes: &[u8]) -> Self
pub fn from_bytes_lossy(bytes: &[u8]) -> Self
Creates a Tag
from bytes.
In case of empty data will return Tag
set to 0.
When bytes
are shorter than 4, will set missing bytes to
.
Data after first 4 bytes is ignored.
Trait Implementations
sourceimpl Ord for Tag
impl Ord for Tag
1.21.0 · sourceconst fn max(self, other: Self) -> Self
const fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourceconst fn min(self, other: Self) -> Self
const fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourceconst fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
const fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialOrd<Tag> for Tag
impl PartialOrd<Tag> for Tag
sourcefn partial_cmp(&self, other: &Tag) -> Option<Ordering>
fn partial_cmp(&self, other: &Tag) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for Tag
impl Eq for Tag
impl StructuralEq for Tag
impl StructuralPartialEq for Tag
Auto Trait Implementations
impl RefUnwindSafe for Tag
impl Send for Tag
impl Sync for Tag
impl Unpin for Tag
impl UnwindSafe for Tag
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more