pub struct Certificate(_);
Expand description
Represent an X509 certificate.
Create a Certificate
from a binary DER encoded certificate
let mut buf = Vec::new();
File::open("my_cert.der")?
.read_to_end(&mut buf)?;
let cert = reqwest::Certificate::from_der(&buf)?;
If the provided buffer is not valid DER, an error will be returned.
Create a Certificate
from a PEM encoded certificate
let mut buf = Vec::new();
File::open("my_cert.pem")?
.read_to_end(&mut buf)?;
let cert = reqwest::Certificate::from_pem(&buf)?;
If the provided buffer is not valid PEM, an error will be returned.
Formats the value using the given formatter.
Read more
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
Returns the argument unchanged.
Calls U::from(self)
.
That is, this conversion is whatever the implementation of
From<T> for U
chooses to do.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.