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 StructuralEq for Tag
impl StructuralPartialEq for Tag
Auto Trait Implementations§
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