Struct AlgorithmIdentifier
pub struct AlgorithmIdentifier(/* private field */);
A DER encoding of the PKIX AlgorithmIdentifier type:
AlgorithmIdentifier ::= SEQUENCE {
algorithm OBJECT IDENTIFIER,
parameters ANY DEFINED BY algorithm OPTIONAL }
-- contains a value of the type
-- registered for use with the
-- algorithm object identifier value
(from https://www.rfc-editor.org/rfc/rfc5280#section-4.1.1.2)
The outer sequence encoding is not included, so this is the DER encoding
of an OID for algorithm plus the parameters value.
For example, this is the rsaEncryption algorithm (but prefer to use the constant
RSA_ENCRYPTION instead):
let rsa_encryption = from_slice;
assert_eq!;
Common values for this type are provided in this module.
Implementations
impl AlgorithmIdentifier
const fn from_slice(bytes: &'static [u8]) -> SelfMakes a new
AlgorithmIdentifierfrom a static octet slice.This does not validate the contents of the slice.
Trait Implementations
impl AsRef<[u8]> for AlgorithmIdentifier
fn as_ref(&self) -> &[u8]
impl Clone for AlgorithmIdentifier
fn clone(&self) -> AlgorithmIdentifier
impl Copy for AlgorithmIdentifier
impl Debug for AlgorithmIdentifier
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Deref for AlgorithmIdentifier
type Target = [u8];fn deref(&self) -> &Self::Target
impl Eq for AlgorithmIdentifier
impl PartialEq for AlgorithmIdentifier
fn eq(&self, other: &AlgorithmIdentifier) -> bool
impl StructuralPartialEq for AlgorithmIdentifier
Auto Trait Implementations
impl Freeze for AlgorithmIdentifier
impl RefUnwindSafe for AlgorithmIdentifier
impl Send for AlgorithmIdentifier
impl Sync for AlgorithmIdentifier
impl Unpin for AlgorithmIdentifier
impl UnsafeUnpin for AlgorithmIdentifier
impl UnwindSafe for AlgorithmIdentifier
Blanket Implementations
impl<P, T> Receiver for AlgorithmIdentifier
where
P: Deref<Target = T> + ?Sized,
T: ?Sized,
type Target = T;
impl<T> Any for AlgorithmIdentifier
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for AlgorithmIdentifier
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for AlgorithmIdentifier
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for AlgorithmIdentifier
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for AlgorithmIdentifier
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for AlgorithmIdentifier
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for AlgorithmIdentifier
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for AlgorithmIdentifier
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for AlgorithmIdentifier
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>