pub struct Tag(/* private fields */);Expand description
The tag field consists of a single byte encoding a tag number from 1 to 254. The values ‘00’ and ‘FF’ are invalid.
Implementations§
Source§impl Tag
impl Tag
Sourcepub fn assert_eq(self, expected: Tag) -> Result<Tag>
pub fn assert_eq(self, expected: Tag) -> Result<Tag>
Assert that this Tag matches the provided expected tag.
On mismatch, returns an Error with ErrorKind::UnexpectedTag.
pub fn with_value<V>(self, value: V) -> TaggedValue<V>
Trait Implementations§
Source§impl Encodable for Tag
impl Encodable 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