pub struct Tag(/* private fields */);Expand description
4-byte type tag. Field is private to enforce validated construction via
try_new (alphabet-checked) or from_raw_bytes (tooling-only, unvalidated).
Implementations§
Source§impl Tag
impl Tag
Sourcepub fn from_raw_bytes(b: [u8; 4]) -> Self
pub fn from_raw_bytes(b: [u8; 4]) -> Self
Construct a Tag from raw 4-byte input WITHOUT alphabet validation.
Reserved for tooling (e.g., inspect()) that needs to surface whatever
bytes were observed on the wire, including alphabet violators. Encoder
- decoder paths MUST go through
try_newinstead.
Trait Implementations§
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 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