Struct rocket::mtls::oid::asn1_rs::TaggedParser
pub struct TaggedParser<'a, TagKind, T> {
pub header: Header<'a>,
pub inner: T,
/* private fields */
}
Available on crate feature
mtls
only.Fields§
§header: Header<'a>
§inner: T
Implementations§
§impl<'a, T> TaggedParser<'a, Implicit, T>
impl<'a, T> TaggedParser<'a, Implicit, T>
pub const fn new_implicit( class: Class, constructed: bool, tag: u32, inner: T ) -> TaggedParser<'a, Implicit, T>
§impl<'a, T> TaggedParser<'a, Explicit, T>
impl<'a, T> TaggedParser<'a, Explicit, T>
pub const fn new_explicit( class: Class, tag: u32, inner: T ) -> TaggedParser<'a, Explicit, T>
§impl<'a, T> TaggedParser<'a, Explicit, T>
impl<'a, T> TaggedParser<'a, Explicit, T>
pub fn from_ber_and_then<F>( class: Class, tag: u32, bytes: &'a [u8], op: F ) -> Result<(&'a [u8], T), Err<Error>>where F: FnOnce(&'a [u8]) -> Result<(&'a [u8], T), Err<Error>>,
pub fn from_der_and_then<F>( class: Class, tag: u32, bytes: &'a [u8], op: F ) -> Result<(&'a [u8], T), Err<Error>>where F: FnOnce(&'a [u8]) -> Result<(&'a [u8], T), Err<Error>>,
§impl<'a, TagKind, T> TaggedParser<'a, TagKind, T>
impl<'a, TagKind, T> TaggedParser<'a, TagKind, T>
§impl<'a, TagKind, T> TaggedParser<'a, TagKind, T>where
TaggedParser<'a, TagKind, T>: FromBer<'a>,
impl<'a, TagKind, T> TaggedParser<'a, TagKind, T>where TaggedParser<'a, TagKind, T>: FromBer<'a>,
§impl<'a, TagKind, T> TaggedParser<'a, TagKind, T>where
TaggedParser<'a, TagKind, T>: FromDer<'a>,
impl<'a, TagKind, T> TaggedParser<'a, TagKind, T>where TaggedParser<'a, TagKind, T>: FromDer<'a>,
Trait Implementations§
§impl<'a, TagKind, T> AsRef<T> for TaggedParser<'a, TagKind, T>
impl<'a, TagKind, T> AsRef<T> for TaggedParser<'a, TagKind, T>
§impl<'a, T> CheckDerConstraints for TaggedParser<'a, Explicit, T>where
T: CheckDerConstraints,
impl<'a, T> CheckDerConstraints for TaggedParser<'a, Explicit, T>where T: CheckDerConstraints,
§impl<'a, T> CheckDerConstraints for TaggedParser<'a, Implicit, T>where
T: CheckDerConstraints + Tagged,
impl<'a, T> CheckDerConstraints for TaggedParser<'a, Implicit, T>where T: CheckDerConstraints + Tagged,
§impl<'a, TagKind, T> Debug for TaggedParser<'a, TagKind, T>where
TagKind: Debug,
T: Debug,
impl<'a, TagKind, T> Debug for TaggedParser<'a, TagKind, T>where TagKind: Debug, T: Debug,
§impl<'a, T> FromBer<'a> for TaggedParser<'a, Explicit, T>where
T: FromBer<'a>,
impl<'a, T> FromBer<'a> for TaggedParser<'a, Explicit, T>where T: FromBer<'a>,
§impl<'a, T> FromBer<'a> for TaggedParser<'a, Implicit, T>where
T: TryFrom<Any<'a>, Error = Error> + Tagged,
impl<'a, T> FromBer<'a> for TaggedParser<'a, Implicit, T>where T: TryFrom<Any<'a>, Error = Error> + Tagged,
§impl<'a, T> FromDer<'a> for TaggedParser<'a, Explicit, T>where
T: FromDer<'a>,
impl<'a, T> FromDer<'a> for TaggedParser<'a, Explicit, T>where T: FromDer<'a>,
§impl<'a, T> FromDer<'a> for TaggedParser<'a, Implicit, T>where
T: TryFrom<Any<'a>, Error = Error> + CheckDerConstraints + Tagged,
impl<'a, T> FromDer<'a> for TaggedParser<'a, Implicit, T>where T: TryFrom<Any<'a>, Error = Error> + CheckDerConstraints + Tagged,
§impl<'a, TagKind, T> PartialEq<TaggedParser<'a, TagKind, T>> for TaggedParser<'a, TagKind, T>where
TagKind: PartialEq<TagKind>,
T: PartialEq<T>,
impl<'a, TagKind, T> PartialEq<TaggedParser<'a, TagKind, T>> for TaggedParser<'a, TagKind, T>where TagKind: PartialEq<TagKind>, T: PartialEq<T>,
§fn eq(&self, other: &TaggedParser<'a, TagKind, T>) -> bool
fn eq(&self, other: &TaggedParser<'a, TagKind, T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.§impl<'a, T> ToDer for TaggedParser<'a, Explicit, T>where
T: ToDer,
impl<'a, T> ToDer for TaggedParser<'a, Explicit, T>where T: ToDer,
§fn to_der_len(&self) -> Result<usize, Error>
fn to_der_len(&self) -> Result<usize, Error>
Get the length of the object, when encoded
§fn write_der_header(
&self,
writer: &mut dyn Write
) -> Result<usize, SerializeError>
fn write_der_header( &self, writer: &mut dyn Write ) -> Result<usize, SerializeError>
Attempt to write the DER header to this writer.
§fn write_der_content(
&self,
writer: &mut dyn Write
) -> Result<usize, SerializeError>
fn write_der_content( &self, writer: &mut dyn Write ) -> Result<usize, SerializeError>
Attempt to write the DER content (all except header) to this writer.
§fn to_der_vec(&self) -> Result<Vec<u8, Global>, SerializeError>
fn to_der_vec(&self) -> Result<Vec<u8, Global>, SerializeError>
Write the DER encoded representation to a newly allocated
Vec<u8>
.§fn to_der_vec_raw(&self) -> Result<Vec<u8, Global>, SerializeError>
fn to_der_vec_raw(&self) -> Result<Vec<u8, Global>, SerializeError>
Similar to using
to_vec
, but uses provided values without changes.
This can generate an invalid encoding for a DER object.§fn write_der(&self, writer: &mut dyn Write) -> Result<usize, SerializeError>
fn write_der(&self, writer: &mut dyn Write) -> Result<usize, SerializeError>
Attempt to write the DER encoded representation (header and content) into this writer. Read more
§fn write_der_raw(&self, writer: &mut dyn Write) -> Result<usize, SerializeError>
fn write_der_raw(&self, writer: &mut dyn Write) -> Result<usize, SerializeError>
Similar to using
to_der
, but uses provided values without changes.
This can generate an invalid encoding for a DER object.§impl<'a, T> ToDer for TaggedParser<'a, Implicit, T>where
T: ToDer,
impl<'a, T> ToDer for TaggedParser<'a, Implicit, T>where T: ToDer,
§fn to_der_len(&self) -> Result<usize, Error>
fn to_der_len(&self) -> Result<usize, Error>
Get the length of the object, when encoded
§fn write_der(&self, writer: &mut dyn Write) -> Result<usize, SerializeError>
fn write_der(&self, writer: &mut dyn Write) -> Result<usize, SerializeError>
Attempt to write the DER encoded representation (header and content) into this writer. Read more
§fn write_der_header(
&self,
writer: &mut dyn Write
) -> Result<usize, SerializeError>
fn write_der_header( &self, writer: &mut dyn Write ) -> Result<usize, SerializeError>
Attempt to write the DER header to this writer.
§fn write_der_content(
&self,
writer: &mut dyn Write
) -> Result<usize, SerializeError>
fn write_der_content( &self, writer: &mut dyn Write ) -> Result<usize, SerializeError>
Attempt to write the DER content (all except header) to this writer.
§fn to_der_vec(&self) -> Result<Vec<u8, Global>, SerializeError>
fn to_der_vec(&self) -> Result<Vec<u8, Global>, SerializeError>
Write the DER encoded representation to a newly allocated
Vec<u8>
.§fn to_der_vec_raw(&self) -> Result<Vec<u8, Global>, SerializeError>
fn to_der_vec_raw(&self) -> Result<Vec<u8, Global>, SerializeError>
Similar to using
to_vec
, but uses provided values without changes.
This can generate an invalid encoding for a DER object.§fn write_der_raw(&self, writer: &mut dyn Write) -> Result<usize, SerializeError>
fn write_der_raw(&self, writer: &mut dyn Write) -> Result<usize, SerializeError>
Similar to using
to_der
, but uses provided values without changes.
This can generate an invalid encoding for a DER object.impl<'a, TagKind, T> StructuralPartialEq for TaggedParser<'a, TagKind, T>
Auto Trait Implementations§
impl<'a, TagKind, T> RefUnwindSafe for TaggedParser<'a, TagKind, T>where T: RefUnwindSafe, TagKind: RefUnwindSafe,
impl<'a, TagKind, T> Send for TaggedParser<'a, TagKind, T>where T: Send, TagKind: Send,
impl<'a, TagKind, T> Sync for TaggedParser<'a, TagKind, T>where T: Sync, TagKind: Sync,
impl<'a, TagKind, T> Unpin for TaggedParser<'a, TagKind, T>where T: Unpin, TagKind: Unpin,
impl<'a, TagKind, T> UnwindSafe for TaggedParser<'a, TagKind, T>where T: UnwindSafe, TagKind: UnwindSafe,
Blanket Implementations§
§impl<'a, T> AsTaggedExplicit<'a> for Twhere
T: 'a,
impl<'a, T> AsTaggedExplicit<'a> for Twhere T: 'a,
§impl<'a, T> AsTaggedImplicit<'a> for Twhere
T: 'a,
impl<'a, T> AsTaggedImplicit<'a> for Twhere T: 'a,
§impl<T> AsUncased for Twhere
T: AsRef<str> + ?Sized,
impl<T> AsUncased for Twhere T: AsRef<str> + ?Sized,
§fn as_uncased(&self) -> &UncasedStr
fn as_uncased(&self) -> &UncasedStr
Convert
self
to an UncasedStr
.