pub struct RustlsConfig<Config> {
    pub rustls_config: RustlsClientConfig,
    pub tcp_config: Config,
}
Expand description

Client configuration for RustlsConnector

Fields§

§rustls_config: RustlsClientConfig

configuration for rustls itself

§tcp_config: Config

configuration for the inner transport

Implementations§

source§

impl<C: Connector> RustlsConfig<C>

source

pub fn new(rustls_config: impl Into<RustlsClientConfig>, tcp_config: C) -> Self

build a new default rustls config with this tcp config

source§

impl<C: Connector> RustlsConfig<C>

source

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

replace the tcp config

Trait Implementations§

source§

impl<Config: Clone> Clone for RustlsConfig<Config>

source§

fn clone(&self) -> RustlsConfig<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<C: Connector> Connector for RustlsConfig<C>

§

type Transport = RustlsTransport<<C 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 RustlsConfig<Config>

source§

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

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

impl<Config: Default> Default for RustlsConfig<Config>

source§

fn default() -> RustlsConfig<Config>

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

Auto Trait Implementations§

§

impl<Config> !RefUnwindSafe for RustlsConfig<Config>

§

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

§

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

§

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

§

impl<Config> !UnwindSafe for RustlsConfig<Config>

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.

source§

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

source§

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,

source§

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

source§

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

source§

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.