[−][src]Struct native_tls::TlsConnectorBuilder
pub struct TlsConnectorBuilder(_);
A builder for TlsConnector
s.
Methods
impl TlsConnectorBuilder
[src]
impl TlsConnectorBuilder
pub fn identity(&mut self, pkcs12: Pkcs12) -> Result<&mut TlsConnectorBuilder>
[src]
pub fn identity(&mut self, pkcs12: Pkcs12) -> Result<&mut TlsConnectorBuilder>
Sets the identity to be used for client certificate authentication.
pub fn supported_protocols(
&mut self,
protocols: &[Protocol]
) -> Result<&mut TlsConnectorBuilder>
[src]
pub fn supported_protocols(
&mut self,
protocols: &[Protocol]
) -> Result<&mut TlsConnectorBuilder>
Sets the protocols which the connector will support.
The protocols supported by default are currently TLS 1.0, TLS 1.1, and TLS 1.2, though this is subject to change.
pub fn add_root_certificate(
&mut self,
cert: Certificate
) -> Result<&mut TlsConnectorBuilder>
[src]
pub fn add_root_certificate(
&mut self,
cert: Certificate
) -> Result<&mut TlsConnectorBuilder>
Adds a certificate to the set of roots that the connector will trust.
The connector will use the system's trust root by default. This method can be used to add to that set when communicating with servers not trusted by the system.
pub fn build(self) -> Result<TlsConnector>
[src]
pub fn build(self) -> Result<TlsConnector>
Consumes the builder, returning a TlsConnector
.
Trait Implementations
impl TlsConnectorBuilderExt for TlsConnectorBuilder
[src]
impl TlsConnectorBuilderExt for TlsConnectorBuilder
ⓘImportant traits for &'a mut Wfn anchor_certificates(&mut self, certs: &[SecCertificate]) -> &mut Self
[src]
fn anchor_certificates(&mut self, certs: &[SecCertificate]) -> &mut Self
: use add_root_certificate
Deprecated
Auto Trait Implementations
impl Send for TlsConnectorBuilder
impl Send for TlsConnectorBuilder
impl Sync for TlsConnectorBuilder
impl Sync for TlsConnectorBuilder
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
ⓘImportant traits for &'a mut Wfn borrow(&self) -> &T
[src]
fn borrow(&self) -> &T
Immutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
ⓘImportant traits for &'a mut Wfn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more