pub struct TagNumber(pub u32);Expand description
ASN.1 tag numbers (i.e. lower 5 bits of a Tag).
From X.690 Section 8.1.2.2:
bits 5 to 1 shall encode the number of the tag as a binary integer with bit 5 as the most significant bit.
This library supports tag numbers ranging from zero to 30 (inclusive) for universal tags and arbitrary 32-bit tag numbers for application, private and context-specific tags.
Section 8.1.2.4 describes how to support multi-byte tag numbers, which are
encoded by using a leading tag number of 31 (0b11111).
Tuple Fields§
§0: u32Implementations§
Source§impl TagNumber
impl TagNumber
Sourcepub const fn new(value: u32) -> Self
👎Deprecated since 0.8.0: use TagNumber(value) directly as inner field is now pub
pub const fn new(value: u32) -> Self
use TagNumber(value) directly as inner field is now pub
Create a new tag number.
Sourcepub fn application(self, constructed: bool) -> Tag
pub fn application(self, constructed: bool) -> Tag
Create an APPLICATION tag with this tag number.
Sourcepub fn context_specific(self, constructed: bool) -> Tag
pub fn context_specific(self, constructed: bool) -> Tag
Create a CONTEXT-SPECIFIC tag with this tag number.
Trait Implementations§
Source§impl Ord for TagNumber
impl Ord for TagNumber
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for TagNumber
impl PartialOrd for TagNumber
impl Copy for TagNumber
impl Eq for TagNumber
impl StructuralPartialEq for TagNumber
Auto Trait Implementations§
impl Freeze for TagNumber
impl RefUnwindSafe for TagNumber
impl Send for TagNumber
impl Sync for TagNumber
impl Unpin for TagNumber
impl UnsafeUnpin for TagNumber
impl UnwindSafe for TagNumber
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