Struct reqwest::Identity[][src]

pub struct Identity { /* fields omitted */ }

Represents a private key and X509 cert as a client certificate.

Implementations

impl Identity[src]

pub fn from_pem(buf: &[u8]) -> Result<Identity>[src]

Parses PEM encoded private key and certificate.

The input should contain a PEM encoded private key and at least one PEM encoded certificate.

Examples

let mut buf = Vec::new();
File::open("my-ident.pem")?
    .read_to_end(&mut buf)?;
let id = reqwest::Identity::from_pem(&buf)?;

Optional

This requires the rustls-tls(-...) Cargo feature enabled.

Trait Implementations

impl Debug for Identity[src]

Auto Trait Implementations

impl RefUnwindSafe for Identity

impl Send for Identity

impl Sync for Identity

impl Unpin for Identity

impl UnwindSafe for Identity

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> WithSubscriber for T[src]