Struct Identity
struct Identity { ... }
Represents a private key and X509 cert as a client certificate.
Implementations
impl Identity
fn from_pem(buf: &[u8]) -> crate::Result<Identity>Parses PEM encoded private key and certificate.
The input should contain a PEM encoded private key and at least one PEM encoded certificate.
Note: The private key must be in RSA, SEC1 Elliptic Curve or PKCS#8 format.
Examples
# use File; # use Read; #Optional
This requires the
rustls(-...)Cargo feature enabled.
impl Clone for Identity
fn clone(self: &Self) -> Identity
impl Debug for Identity
fn fmt(self: &Self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Freeze for Identity
impl RefUnwindSafe for Identity
impl Send for Identity
impl Sync for Identity
impl Unpin for Identity
impl UnwindSafe for Identity
impl<T> Any for Identity
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for Identity
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for Identity
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for Identity
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> ErasedDestructor for Identity
impl<T> From for Identity
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Instrument for Identity
impl<T> PolicyExt for Identity
fn and<P, B, E>(self: Self, other: P) -> And<T, P> where T: Policy<B, E>, P: Policy<B, E>fn or<P, B, E>(self: Self, other: P) -> Or<T, P> where T: Policy<B, E>, P: Policy<B, E>
impl<T> ToOwned for Identity
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T> WithSubscriber for Identity
impl<T, U> Into for Identity
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for Identity
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for Identity
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>