Struct musli_wire::tag::Tag
source · [−]#[repr(transparent)]pub struct Tag { /* private fields */ }Expand description
Implementations
sourceimpl Tag
impl Tag
sourcepub const fn new(kind: Kind, data: u8) -> Self
pub const fn new(kind: Kind, data: u8) -> Self
Construct a new tag through an unchecked constructor.
data must not be equal to or larger than [DATA_MASK], or else it could
corrupt the payload.
sourcepub const fn data(self) -> Option<u8>
pub const fn data(self) -> Option<u8>
Perform checked access over the internal data. Returns None if data is empty.
Trait Implementations
impl 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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more