Enum der::Tag [−][src]
ASN.1 tags.
Tags are the leading byte of the Tag-Length-Value encoding used by ASN.1 DER and identify the type of the subsequent value.
Variants (Non-exhaustive)
BOOLEAN
tag.
INTEGER
tag.
BIT STRING
tag.
OCTET STRING
tag.
NULL
tag.
OBJECT IDENTIFIER
tag.
UTF8String
tag.
SET
and SET OF
tag.
PrintableString
tag.
IA5String
tag.
UTCTime
tag.
GeneralizedTime
tag.
SEQUENCE
tag.
Note that the universal tag number for SEQUENCE
is technically 0x10
however we presently only support the constructed form, which has the
6th bit (i.e. 0x20
) set.
Context-specific tag (0) unique to a particular structure.
Context-specific tag (1) unique to a particular structure.
Context-specific tag (2) unique to a particular structure.
Context-specific tag (3) unique to a particular structure.
Implementations
impl Tag
[src]
pub fn assert_eq(self, expected: Tag) -> Result<Tag>
[src]
Assert that this Tag
matches the provided expected tag.
On mismatch, returns an Error
with ErrorKind::UnexpectedTag
.
pub fn type_name(self) -> &'static str
[src]
Names of ASN.1 type which corresponds to a given Tag
.
Trait Implementations
impl Clone for Tag
[src]
impl Copy for Tag
[src]
impl Debug for Tag
[src]
impl Decodable<'_> for Tag
[src]
fn decode(decoder: &mut Decoder<'_>) -> Result<Self>
[src]
fn from_der(bytes: &'a [u8]) -> Result<Self>
[src]
impl Display for Tag
[src]
impl Encodable for Tag
[src]
fn encoded_len(&self) -> Result<Length>
[src]
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>
[src]
fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8]>
[src]
fn encode_to_vec(&self, buf: &mut Vec<u8>) -> Result<Length>
[src]
fn to_vec(&self) -> Result<Vec<u8>>
[src]
impl Eq for Tag
[src]
impl PartialEq<Tag> for Tag
[src]
impl StructuralEq for Tag
[src]
impl StructuralPartialEq for Tag
[src]
impl TryFrom<u8> for Tag
[src]
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,