pub struct Tag {
pub class: TagClass,
pub tag_type: TagType,
pub number: u32,
}Expand description
A BER tag identifier.
Fields§
§class: TagClassThe tag class
tag_type: TagTypeWhether this is a constructed type
number: u32The tag number
Implementations§
Source§impl Tag
impl Tag
Sourcepub const fn universal_primitive(number: u32) -> Self
pub const fn universal_primitive(number: u32) -> Self
Create a universal primitive tag.
Sourcepub const fn universal_constructed(number: u32) -> Self
pub const fn universal_constructed(number: u32) -> Self
Create a universal constructed tag.
Sourcepub const fn context_primitive(number: u32) -> Self
pub const fn context_primitive(number: u32) -> Self
Create a context-specific primitive tag.
Sourcepub const fn context_constructed(number: u32) -> Self
pub const fn context_constructed(number: u32) -> Self
Create a context-specific constructed tag.
Sourcepub const fn application_primitive(number: u32) -> Self
pub const fn application_primitive(number: u32) -> Self
Create an application primitive tag.
Sourcepub const fn application_constructed(number: u32) -> Self
pub const fn application_constructed(number: u32) -> Self
Create an application constructed tag.
Sourcepub fn is_primitive(&self) -> bool
pub fn is_primitive(&self) -> bool
Check if this tag is primitive.
Sourcepub fn is_constructed(&self) -> bool
pub fn is_constructed(&self) -> bool
Check if this tag is constructed.
Sourcepub fn is_universal(&self) -> bool
pub fn is_universal(&self) -> bool
Check if this tag is universal class.
Sourcepub fn is_context(&self) -> bool
pub fn is_context(&self) -> bool
Check if this tag is context-specific class.
Sourcepub fn is_application(&self) -> bool
pub fn is_application(&self) -> bool
Check if this tag is application class.
Source§impl Tag
impl Tag
Sourcepub const BIT_STRING: Tag
pub const BIT_STRING: Tag
BIT STRING tag
Sourcepub const OCTET_STRING: Tag
pub const OCTET_STRING: Tag
OCTET STRING tag
Sourcepub const ENUMERATED: Tag
pub const ENUMERATED: Tag
ENUMERATED tag
Sourcepub const UTF8_STRING: Tag
pub const UTF8_STRING: Tag
UTF8String tag
Sourcepub const RELATIVE_OID: Tag
pub const RELATIVE_OID: Tag
RELATIVE-OID tag
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