pub struct Tag {
pub class: Class,
pub constructed: bool,
pub number: u16,
}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.
Fields§
§class: Class§constructed: bool§number: u16Implementations§
Source§impl Tag
impl Tag
pub const BOOLEAN: Self
pub const INTEGER: Self
pub const BIT_STRING: Self
pub const OCTET_STRING: Self
pub const NULL: Self
pub const OBJECT_IDENTIFIER: Self
pub const UTF8_STRING: Self
pub const PRINTABLE_STRING: Self
pub const UTC_TIME: Self
pub const GENERALIZED_TIME: Self
pub const SEQUENCE: Self
pub const SET: Self
pub fn from(class: Class, constructed: bool, number: u16) -> Self
pub const fn universal(number: u16) -> Self
pub const fn application(number: u16) -> Self
pub const fn context(number: u16) -> Self
pub const fn private(number: u16) -> Self
pub const fn constructed(self) -> Self
Trait Implementations§
Source§impl Encodable for Tag
impl Encodable for Tag
Source§impl TagLike for Tag
impl TagLike for Tag
Source§fn embedding(self) -> Tag
fn embedding(self) -> Tag
To stick with one Error type, make sure the tag type can somehow
or other be coerced into a BerTag.
Source§fn with_value<V>(self, value: V) -> TaggedValue<V, Self>
fn with_value<V>(self, value: V) -> TaggedValue<V, Self>
Ergonomic way to get a TaggedValue for a given tag and value
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