Enum spki::AlgorithmParameters [−][src]
The parameters
field of AlgorithmIdentifier
.
This is an algorithm-defined ANY
field, but we map it into an enum
for now to simplify the ObjectIdentifier
use case.
Ideally this type can eventually go away and be replaced by Any
with the assistance of OID reference types. See the following tracking
issue for more info:
Variants
Any(Any<'a>)
Catch-all ASN.1 ANY
type.
Types which don't map to the other variants of this enum will be mapped to this one instead.
ASN.1 NULL
value
Oid(ObjectIdentifier)
ObjectIdentifier
that names a specific algorithm within a larger
algorithm family.
Implementations
impl<'a> AlgorithmParameters<'a>
[src]
pub fn any(self) -> Option<Any<'a>>
[src]
Get the Any
value if applicable.
Note that this will return None
in the event the parameter is an
OID or NULL
.
pub fn is_null(self) -> bool
[src]
Is this parameter value NULL?
pub fn is_oid(self) -> bool
[src]
Is this parameter value an OID?
pub fn oid(self) -> Option<ObjectIdentifier>
[src]
Get the OID value if applicable.
pub fn tag(self) -> Tag
[src]
Get the ASN.1 DER Tag
for these parameters.
Trait Implementations
impl<'a> Clone for AlgorithmParameters<'a>
[src]
fn clone(&self) -> AlgorithmParameters<'a>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a> Copy for AlgorithmParameters<'a>
[src]
impl<'a> Debug for AlgorithmParameters<'a>
[src]
impl<'a> Encodable for AlgorithmParameters<'a>
[src]
fn encoded_len(&self) -> Result<Length>
[src]
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>
[src]
pub fn encode_to_slice(&self, buf: &'a mut [u8]) -> Result<&'a [u8], Error>
[src]
impl<'a> Eq for AlgorithmParameters<'a>
[src]
impl<'a> From<Null> for AlgorithmParameters<'a>
[src]
fn from(_: Null) -> AlgorithmParameters<'a>
[src]
impl<'a> From<ObjectIdentifier> for AlgorithmParameters<'a>
[src]
fn from(oid: ObjectIdentifier) -> AlgorithmParameters<'a>
[src]
impl<'a> PartialEq<AlgorithmParameters<'a>> for AlgorithmParameters<'a>
[src]
fn eq(&self, other: &AlgorithmParameters<'a>) -> bool
[src]
fn ne(&self, other: &AlgorithmParameters<'a>) -> bool
[src]
impl<'a> StructuralEq for AlgorithmParameters<'a>
[src]
impl<'a> StructuralPartialEq for AlgorithmParameters<'a>
[src]
impl<'a> TryFrom<Any<'a>> for AlgorithmParameters<'a>
[src]
Auto Trait Implementations
impl<'a> Send for AlgorithmParameters<'a>
[src]
impl<'a> Sync for AlgorithmParameters<'a>
[src]
impl<'a> Unpin for AlgorithmParameters<'a>
[src]
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<'a, T> Decodable<'a> for T where
T: TryFrom<Any<'a>, Error = Error>,
[src]
T: TryFrom<Any<'a>, Error = Error>,
pub fn decode(decoder: &mut Decoder<'a>) -> Result<T, Error>
[src]
pub fn from_bytes(bytes: &'a [u8]) -> Result<Self, Error>
[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, 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>,