Struct asn1::Implicit

source ·
pub struct Implicit<T, const TAG: u32> { /* private fields */ }
Expand description

Implicit is a type which wraps another ASN.1 type, indicating that the tag is an ASN.1 IMPLICIT. This will generally be used with Option or Choice.

Implementations§

source§

impl<T, const TAG: u32> Implicit<T, { TAG }>

source

pub fn new(v: T) -> Self

source

pub fn as_inner(&self) -> &T

source

pub fn into_inner(self) -> T

Trait Implementations§

source§

impl<T: Debug, const TAG: u32> Debug for Implicit<T, TAG>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T, const TAG: u32> From<T> for Implicit<T, { TAG }>

source§

fn from(v: T) -> Self

Converts to this type from the input type.
source§

impl<T: PartialEq, const TAG: u32> PartialEq for Implicit<T, TAG>

source§

fn eq(&self, other: &Implicit<T, TAG>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'a, T: SimpleAsn1Readable<'a>, const TAG: u32> SimpleAsn1Readable<'a> for Implicit<T, { TAG }>

source§

const TAG: Tag = _

source§

fn parse_data(data: &'a [u8]) -> ParseResult<Self>

source§

impl<T: SimpleAsn1Writable, const TAG: u32> SimpleAsn1Writable for Implicit<T, { TAG }>

source§

const TAG: Tag = _

source§

fn write_data(&self, dest: &mut WriteBuf) -> WriteResult

source§

impl<T: Eq, const TAG: u32> Eq for Implicit<T, TAG>

source§

impl<T, const TAG: u32> StructuralPartialEq for Implicit<T, TAG>

Auto Trait Implementations§

§

impl<T, const TAG: u32> RefUnwindSafe for Implicit<T, TAG>
where T: RefUnwindSafe,

§

impl<T, const TAG: u32> Send for Implicit<T, TAG>
where T: Send,

§

impl<T, const TAG: u32> Sync for Implicit<T, TAG>
where T: Sync,

§

impl<T, const TAG: u32> Unpin for Implicit<T, TAG>
where T: Unpin,

§

impl<T, const TAG: u32> UnwindSafe for Implicit<T, TAG>
where T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<'a, T> Asn1Readable<'a> for T
where T: SimpleAsn1Readable<'a>,

source§

fn parse(parser: &mut Parser<'a>) -> Result<T, ParseError>

source§

fn can_parse(tag: Tag) -> bool

source§

impl<T> Asn1Writable for T

source§

fn write(&self, w: &mut Writer<'_>) -> Result<(), WriteError>

source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<!> for T

source§

fn from(t: !) -> T

Converts to this type from the input type.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.