Skip to main content

CertSource

Enum CertSource 

Source
pub enum CertSource<'a> {
    Der(&'a [u8]),
    Compressed(CertificateDefinition<'a>),
    Lazy(fn(&mut [u8]) -> Option<usize>),
}
Expand description

Source for the client certificate presented during mutual TLS.

Variants§

§

Der(&'a [u8])

Pre-built DER-encoded X.509 certificate.

§

Compressed(CertificateDefinition<'a>)

Compressed certificate reconstructed from ATECC608 at handshake time.

§

Lazy(fn(&mut [u8]) -> Option<usize>)

Certificate loaded on-demand via a loader function. The function receives a buffer and returns the number of DER bytes written, or None on failure.

Trait Implementations§

Source§

impl<'a> From<&'a [u8]> for CertSource<'a>

Source§

fn from(der: &'a [u8]) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<CertificateDefinition<'a>> for CertSource<'a>

Source§

fn from(def: CertificateDefinition<'a>) -> Self

Converts to this type from the input type.
Source§

impl From<fn(&mut [u8]) -> Option<usize>> for CertSource<'_>

Source§

fn from(loader: fn(&mut [u8]) -> Option<usize>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<'a> Forget for CertSource<'a>

§

impl<'a> Freeze for CertSource<'a>

§

impl<'a> Move for CertSource<'a>

§

impl<'a> RefUnwindSafe for CertSource<'a>

§

impl<'a> Send for CertSource<'a>

§

impl<'a> Sync for CertSource<'a>

§

impl<'a> Unpin for CertSource<'a>

§

impl<'a> UnsafeUnpin for CertSource<'a>

§

impl<'a> UnwindSafe for CertSource<'a>

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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.