Skip to main content

Cert

Struct Cert 

Source
pub struct Cert { /* private fields */ }
Expand description

A single embedded CA root certificate.

All accessors are zero-cost: the fields point into data baked into the binary at build time.

Implementations§

Source§

impl Cert

Source

pub const fn der(&self) -> &'static [u8]

The full DER-encoded Certificate.

Source

pub const fn subject_der(&self) -> &'static [u8]

The raw DER of the certificate’s subject Name (the SEQUENCE TLV).

Source

pub const fn subject_hash(&self) -> u32

The OpenSSL subject hash (the 062cdee6 part of a hash name).

Source

pub const fn seq(&self) -> u8

The collision sequence number (the 0 in 062cdee6.0).

Source

pub const fn label(&self) -> &'static str

A human-readable label (the NSS CKA_LABEL).

Source

pub const fn hash_name(&self) -> HashName

The OpenSSL hash name ("062cdee6.0") as a Display value — formatting it needs no allocation.

Trait Implementations§

Source§

impl Debug for Cert

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Cert

§

impl RefUnwindSafe for Cert

§

impl Send for Cert

§

impl Sync for Cert

§

impl Unpin for Cert

§

impl UnsafeUnpin for Cert

§

impl UnwindSafe for Cert

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<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<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>,

Source§

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>,

Source§

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.