Enum der_parser::DerObjectContent
source · pub enum DerObjectContent<'a> {
Show 21 variants
Boolean(bool),
Integer(&'a [u8]),
BitString(u8, BitStringObject<'a>),
OctetString(&'a [u8]),
Null,
Enum(u64),
OID(Oid),
RelativeOID(Oid),
NumericString(&'a [u8]),
PrintableString(&'a [u8]),
IA5String(&'a [u8]),
UTF8String(&'a [u8]),
T61String(&'a [u8]),
BmpString(&'a [u8]),
Sequence(Vec<DerObject<'a>>),
Set(Vec<DerObject<'a>>),
UTCTime(&'a [u8]),
GeneralizedTime(&'a [u8]),
GeneralString(&'a [u8]),
ContextSpecific(u8, Option<Box<DerObject<'a>>>),
Unknown(&'a [u8]),
}
Variants
Boolean(bool)
Integer(&'a [u8])
BitString(u8, BitStringObject<'a>)
OctetString(&'a [u8])
Null
Enum(u64)
OID(Oid)
RelativeOID(Oid)
NumericString(&'a [u8])
PrintableString(&'a [u8])
IA5String(&'a [u8])
UTF8String(&'a [u8])
T61String(&'a [u8])
BmpString(&'a [u8])
Sequence(Vec<DerObject<'a>>)
Set(Vec<DerObject<'a>>)
UTCTime(&'a [u8])
GeneralizedTime(&'a [u8])
GeneralString(&'a [u8])
ContextSpecific(u8, Option<Box<DerObject<'a>>>)
Unknown(&'a [u8])
Implementations
sourceimpl<'a> DerObjectContent<'a>
impl<'a> DerObjectContent<'a>
pub fn as_u64(&self) -> Result<u64, DerError>
pub fn as_u32(&self) -> Result<u32, DerError>
pub fn as_bool(&self) -> Result<bool, DerError>
pub fn as_oid(&self) -> Result<&Oid, DerError>
pub fn as_oid_val(&self) -> Result<Oid, DerError>
pub fn as_context_specific(
&self
) -> Result<(u8, Option<Box<DerObject<'a>>>), DerError>
pub fn as_bitstring_ref(&self) -> Result<&BitStringObject<'_>, DerError>
pub fn as_bitstring(&'a self) -> Result<BitStringObject<'a>, DerError>
pub fn as_sequence(&self) -> Result<&Vec<DerObject<'a>>, DerError>
pub fn as_set(&self) -> Result<&Vec<DerObject<'a>>, DerError>
pub fn as_slice(&self) -> Result<&'a [u8], DerError>
pub fn tag(&self) -> DerTag
Trait Implementations
sourceimpl<'a> Clone for DerObjectContent<'a>
impl<'a> Clone for DerObjectContent<'a>
sourcefn clone(&self) -> DerObjectContent<'a>
fn clone(&self) -> DerObjectContent<'a>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<'a> Debug for DerObjectContent<'a>
impl<'a> Debug for DerObjectContent<'a>
sourceimpl<'a> From<DerObjectContent<'a>> for DerObject<'a>
impl<'a> From<DerObjectContent<'a>> for DerObject<'a>
Build a DER object from a DerObjectContent.
sourcefn from(obj: DerObjectContent<'a>) -> DerObject<'a>
fn from(obj: DerObjectContent<'a>) -> DerObject<'a>
Converts to this type from the input type.
sourceimpl<'a> PartialEq<DerObjectContent<'a>> for DerObjectContent<'a>
impl<'a> PartialEq<DerObjectContent<'a>> for DerObjectContent<'a>
sourcefn eq(&self, other: &DerObjectContent<'a>) -> bool
fn eq(&self, other: &DerObjectContent<'a>) -> bool
impl<'a> StructuralPartialEq for DerObjectContent<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for DerObjectContent<'a>
impl<'a> Send for DerObjectContent<'a>
impl<'a> Sync for DerObjectContent<'a>
impl<'a> Unpin for DerObjectContent<'a>
impl<'a> UnwindSafe for DerObjectContent<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more