Type Alias AlgorithmIdentifierOwned

Source
pub type AlgorithmIdentifierOwned = AlgorithmIdentifier<Any>;
Expand description

AlgorithmIdentifier reference which has Any parameters.

Aliased Type§

struct AlgorithmIdentifierOwned {
    pub oid: ObjectIdentifier,
    pub parameters: Option<Any>,
}

Fields§

§oid: ObjectIdentifier

Algorithm OID, i.e. the algorithm field in the AlgorithmIdentifier ASN.1 schema.

§parameters: Option<Any>

Algorithm parameters.

Implementations

Source§

impl<Params> AlgorithmIdentifier<Params>

Source

pub fn assert_algorithm_oid( &self, expected_oid: ObjectIdentifier, ) -> Result<ObjectIdentifier>

Assert the algorithm OID is an expected value.

Trait Implementations§

Source§

impl OwnedToRef for AlgorithmIdentifierOwned

Source§

type Borrowed<'a> = AlgorithmIdentifier<AnyRef<'a>>

The resulting type referencing back to Self
Source§

fn owned_to_ref(&self) -> Self::Borrowed<'_>

Creates a new object referencing back to the self for storage
Source§

impl<Params: Clone> Clone for AlgorithmIdentifier<Params>

Source§

fn clone(&self) -> AlgorithmIdentifier<Params>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<Params: Debug> Debug for AlgorithmIdentifier<Params>

Source§

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

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

impl<'a, Params> DecodeValue<'a> for AlgorithmIdentifier<Params>
where Params: Choice<'a>,

Source§

fn decode_value<R: Reader<'a>>(reader: &mut R, header: Header) -> Result<Self>

Attempt to decode this message using the provided Reader.
Source§

impl<Params> EncodeValue for AlgorithmIdentifier<Params>
where Params: Encode,

Source§

fn value_len(&self) -> Result<Length>

Compute the length of this value (sans [Tag]+Length header) when encoded as ASN.1 DER.
Source§

fn encode_value(&self, writer: &mut impl Writer) -> Result<()>

Encode value (sans [Tag]+Length header) as ASN.1 DER using the provided Writer.
Source§

fn header(&self) -> Result<Header, Error>
where Self: Tagged,

Get the Header used to encode this value.
Source§

impl<Params: Ord> Ord for AlgorithmIdentifier<Params>

Source§

fn cmp(&self, other: &AlgorithmIdentifier<Params>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl<Params: PartialEq> PartialEq for AlgorithmIdentifier<Params>

Source§

fn eq(&self, other: &AlgorithmIdentifier<Params>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<Params: PartialOrd> PartialOrd for AlgorithmIdentifier<Params>

Source§

fn partial_cmp(&self, other: &AlgorithmIdentifier<Params>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<'a, Params> TryFrom<&'a [u8]> for AlgorithmIdentifier<Params>
where Params: Choice<'a> + Encode,

Source§

type Error = Error

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

fn try_from(bytes: &'a [u8]) -> Result<Self>

Performs the conversion.
Source§

impl<Params> ValueOrd for AlgorithmIdentifier<Params>
where Params: DerOrd,

Source§

fn value_cmp(&self, other: &Self) -> Result<Ordering>

Return an Ordering between value portion of TLV-encoded self and other when serialized as ASN.1 DER.
Source§

impl<Params: Copy> Copy for AlgorithmIdentifier<Params>

Source§

impl<Params: Eq> Eq for AlgorithmIdentifier<Params>

Source§

impl<'a, Params> Sequence<'a> for AlgorithmIdentifier<Params>
where Params: Choice<'a> + Encode,

Source§

impl<Params> StructuralPartialEq for AlgorithmIdentifier<Params>