Struct pkcs8::AlgorithmIdentifier [−][src]
X.509 AlgorithmIdentifier
as defined in RFC 5280 Section 4.1.1.2.
AlgorithmIdentifier ::= SEQUENCE {
algorithm OBJECT IDENTIFIER,
parameters ANY DEFINED BY algorithm OPTIONAL }
Fields
oid: ObjectIdentifier
Algorithm OID, i.e. the algorithm
field in the AlgorithmIdentifier
ASN.1 schema.
parameters: Option<AlgorithmParameters<'a>>
Algorithm parameters
.
Implementations
impl<'a> AlgorithmIdentifier<'a>
[src]
pub fn parameters_any(&self) -> Result<Any<'a>, Error>
[src]
Get the parameters
field as an Any
.
Returns an error if parameters
are None
, or if they are Some
but are an ObjectIdentifier
or Null
, i.e. this method is
explicitly for handling cases other than those two.
pub fn parameters_oid(&self) -> Result<ObjectIdentifier, Error>
[src]
Get the parameters
field as an ObjectIdentifier
.
Returns an error if it is absent or not an OID.
Trait Implementations
impl<'a> Clone for AlgorithmIdentifier<'a>
[src]
pub fn clone(&self) -> AlgorithmIdentifier<'a>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a> Copy for AlgorithmIdentifier<'a>
[src]
impl<'a> Debug for AlgorithmIdentifier<'a>
[src]
impl<'a> Eq for AlgorithmIdentifier<'a>
[src]
impl<'a> From<Pbkdf2Prf> for AlgorithmIdentifier<'a>
[src]
pub fn from(prf: Pbkdf2Prf) -> AlgorithmIdentifier<'a>
[src]
impl<'a> Message<'a> for AlgorithmIdentifier<'a>
[src]
pub fn fields<F, T>(&self, f: F) -> Result<T, Error> where
F: FnOnce(&[&dyn Encodable]) -> Result<T, Error>,
[src]
F: FnOnce(&[&dyn Encodable]) -> Result<T, Error>,
impl<'a> PartialEq<AlgorithmIdentifier<'a>> for AlgorithmIdentifier<'a>
[src]
pub fn eq(&self, other: &AlgorithmIdentifier<'a>) -> bool
[src]
pub fn ne(&self, other: &AlgorithmIdentifier<'a>) -> bool
[src]
impl<'a> StructuralEq for AlgorithmIdentifier<'a>
[src]
impl<'a> StructuralPartialEq for AlgorithmIdentifier<'a>
[src]
impl<'a> TryFrom<&'a [u8]> for AlgorithmIdentifier<'a>
[src]
type Error = Error
The type returned in the event of a conversion error.
pub fn try_from(bytes: &'a [u8]) -> Result<AlgorithmIdentifier<'a>, Error>
[src]
impl<'a> TryFrom<Any<'a>> for AlgorithmIdentifier<'a>
[src]
type Error = Error
The type returned in the event of a conversion error.
pub fn try_from(any: Any<'a>) -> Result<AlgorithmIdentifier<'a>, Error>
[src]
impl<'a> TryFrom<EncryptionScheme<'a>> for AlgorithmIdentifier<'a>
[src]
type Error = Error
The type returned in the event of a conversion error.
pub fn try_from(
scheme: EncryptionScheme<'a>
) -> Result<AlgorithmIdentifier<'a>, Error>
[src]
scheme: EncryptionScheme<'a>
) -> Result<AlgorithmIdentifier<'a>, Error>
Auto Trait Implementations
impl<'a> RefUnwindSafe for AlgorithmIdentifier<'a>
impl<'a> Send for AlgorithmIdentifier<'a>
impl<'a> Sync for AlgorithmIdentifier<'a>
impl<'a> Unpin for AlgorithmIdentifier<'a>
impl<'a> UnwindSafe for AlgorithmIdentifier<'a>
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> Choice<'a> for T where
T: Decodable<'a> + Encodable + Tagged,
[src]
T: Decodable<'a> + Encodable + Tagged,
pub fn can_decode(tag: Tag) -> bool
[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<'a, M> Encodable for M where
M: Message<'a>,
[src]
M: Message<'a>,
pub fn encoded_len(&self) -> Result<Length, Error>
[src]
pub fn encode(&self, encoder: &mut Encoder<'_>) -> Result<(), Error>
[src]
pub fn encode_to_slice(&self, buf: &'a mut [u8]) -> Result<&'a [u8], Error>
[src]
pub fn encode_to_vec(&self, buf: &mut Vec<u8, Global>) -> Result<Length, Error>
[src]
pub fn to_vec(&self) -> Result<Vec<u8, Global>, 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> Same<T> for T
type Output = T
Should always be Self
impl<'a, M> Tagged for M where
M: Message<'a>,
[src]
M: Message<'a>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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>,