pub struct NativeTlsConfig<Config> {
    pub tcp_config: Config,
    pub tls_connector: Arc<TlsConnector>,
}
Expand description

Configuration for the native tls client connector

Fields§

§tcp_config: Config

configuration for the inner Connector (usually tcp)

§tls_connector: Arc<TlsConnector>

native tls configuration

Although async_native_tls calls this a TlsConnector, it’s actually a builder ¯_(ツ)_/¯

Implementations§

source§

impl<C: Connector> NativeTlsConfig<C>

source

pub fn with_tcp_config(self, config: C) -> Self

replace the tcp config

Trait Implementations§

source§

impl<Config> AsRef<Config> for NativeTlsConfig<Config>

source§

fn as_ref(&self) -> &Config

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<Config: Clone> Clone for NativeTlsConfig<Config>

source§

fn clone(&self) -> NativeTlsConfig<Config>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Connector> Connector for NativeTlsConfig<T>

§

type Transport = NativeTlsTransport<<T as Connector>::Transport>

source§

fn connect<'life0, 'life1, 'async_trait>( &'life0 self, url: &'life1 Url ) -> Pin<Box<dyn Future<Output = Result<Self::Transport>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Initiate a connection to the provided url Read more
source§

fn spawn<Fut: Future<Output = ()> + Send + 'static>(&self, fut: Fut)

source§

impl<Config: Debug> Debug for NativeTlsConfig<Config>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<Config: Default> Default for NativeTlsConfig<Config>

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<C: Connector> From<C> for NativeTlsConfig<C>

source§

fn from(tcp_config: C) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<Config> RefUnwindSafe for NativeTlsConfig<Config>
where Config: RefUnwindSafe,

§

impl<Config> Send for NativeTlsConfig<Config>
where Config: Send,

§

impl<Config> Sync for NativeTlsConfig<Config>
where Config: Sync,

§

impl<Config> Unpin for NativeTlsConfig<Config>
where Config: Unpin,

§

impl<Config> UnwindSafe for NativeTlsConfig<Config>
where Config: UnwindSafe,

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.

§

impl<T> ObjectSafeConnector for T
where T: Connector,

§

fn connect<'life0, 'life1, 'async_trait>( &'life0 self, url: &'life1 Url ) -> Pin<Box<dyn Future<Output = Result<BoxedTransport, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, T: 'async_trait,

§

fn spawn(&self, fut: Pin<Box<dyn Future<Output = ()> + Send>>)

§

fn boxed(self) -> Box<dyn ObjectSafeConnector>
where Self: Sized,

§

fn arced(self) -> Arc<dyn ObjectSafeConnector>
where Self: Sized,

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.