pub enum Tag {
Universal(usize),
Application(usize),
ContextSpecific(usize),
Private(usize),
}Expand description
ITU-T X.680 | ISO/IEC 8824-1, chapter 8
§Ordering
According to ITU-T X.680 | ISO/IEC 8824-1, 8.6, the canonical order is a) Universal, Application, ContextSpecific and Private and b) within each class, the numbers shall be ordered ascending
use asn1rs_model::model::Tag;
let mut tags = vec![
Tag::Universal(1),
Tag::Application(0),
Tag::Private(7),
Tag::ContextSpecific(107),
Tag::ContextSpecific(32),
Tag::Universal(0),
];
tags.sort();
assert_eq!(tags, vec![
Tag::Universal(0),
Tag::Universal(1),
Tag::Application(0),
Tag::ContextSpecific(32),
Tag::ContextSpecific(107),
Tag::Private(7),
]);Variants§
Implementations§
Source§impl Tag
impl Tag
pub const DEFAULT_BOOLEAN: Tag
pub const DEFAULT_INTEGER: Tag
pub const DEFAULT_BIT_STRING: Tag
pub const DEFAULT_OCTET_STRING: Tag
pub const DEFAULT_NULL: Tag
pub const DEFAULT_ENUMERATED: Tag
pub const DEFAULT_UTF8_STRING: Tag
pub const DEFAULT_SEQUENCE: Tag
pub const DEFAULT_SEQUENCE_OF: Tag
pub const DEFAULT_SET: Tag
pub const DEFAULT_SET_OF: Tag
Sourcepub const DEFAULT_NUMERIC_STRING: Tag
pub const DEFAULT_NUMERIC_STRING: Tag
ITU-T Rec. X.680, 41
Sourcepub const DEFAULT_PRINTABLE_STRING: Tag
pub const DEFAULT_PRINTABLE_STRING: Tag
ITU-T Rec. X.680, 41
Sourcepub const DEFAULT_TELETEXT_STRING: Tag
pub const DEFAULT_TELETEXT_STRING: Tag
ITU-T Rec. X.680, 41
Sourcepub const DEFAULT_VIDEOTEXT_STRING: Tag
pub const DEFAULT_VIDEOTEXT_STRING: Tag
ITU-T Rec. X.680, 41
Sourcepub const DEFAULT_IA5_STRING: Tag
pub const DEFAULT_IA5_STRING: Tag
ITU-T Rec. X.680, 41
Sourcepub const DEFAULT_GRAPHIC_STRING: Tag
pub const DEFAULT_GRAPHIC_STRING: Tag
ITU-T Rec. X.680, 41
Sourcepub const DEFAULT_VISIBLE_STRING: Tag
pub const DEFAULT_VISIBLE_STRING: Tag
ITU-T Rec. X.680, 41
Sourcepub const DEFAULT_GENERAL_STRING: Tag
pub const DEFAULT_GENERAL_STRING: Tag
ITU-T Rec. X.680, 41
Sourcepub const DEFAULT_UNIVERSAL_STRING: Tag
pub const DEFAULT_UNIVERSAL_STRING: Tag
ITU-T Rec. X.680, 41
Sourcepub const DEFAULT_BMP_STRING: Tag
pub const DEFAULT_BMP_STRING: Tag
ITU-T Rec. X.680, 41
Trait Implementations§
Source§impl Ord for Tag
impl Ord for Tag
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 Tag
impl PartialOrd 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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.