#[repr(transparent)]pub struct Tag(pub u32);
Expand description
A 4-byte tag.
Tuple Fields§
§0: u32
Implementations§
Source§impl Tag
impl Tag
Sourcepub const fn from_bytes(bytes: &[u8; 4]) -> Self
pub const fn from_bytes(bytes: &[u8; 4]) -> Self
Creates a Tag
from bytes.
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.
Sourcepub fn to_lowercase(&self) -> Self
pub fn to_lowercase(&self) -> Self
Converts tag to lowercase.
Sourcepub fn to_uppercase(&self) -> Self
pub fn to_uppercase(&self) -> Self
Converts tag to uppercase.
Trait Implementations§
Source§impl Ord for Tag
impl Ord for Tag
Source§impl PartialOrd for Tag
impl PartialOrd for Tag
impl Copy for Tag
impl Eq for Tag
impl StructuralPartialEq for Tag
Auto Trait Implementations§
impl Freeze for Tag
impl RefUnwindSafe for Tag
impl Send for Tag
impl Sync for Tag
impl Unpin 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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)