Struct ProxyConfig

Source
pub struct ProxyConfig<C, S>
where C: NetworkConnector + Send + Sync + 'static, C::Stream: NetworkStream + Clone + Send, S: SslClient<C::Stream> + Send + Sync + 'static,
{ /* private fields */ }
Expand description

Proxy server configuration with a custom connector and TLS wrapper.

Implementations§

Source§

impl<C, S> ProxyConfig<C, S>
where C: NetworkConnector + Send + Sync + 'static, C::Stream: NetworkStream + Clone + Send, S: SslClient<C::Stream> + Send + Sync + 'static,

Source

pub fn new<H: Into<Cow<'static, str>>>( scheme: &str, host: H, port: u16, connector: C, ssl: S, ) -> ProxyConfig<C, S>

Create a new ProxyConfig.

Source

pub fn set_pool_config(&mut self, pool_config: Option<Config>)

Change the pool::Config for the proxy.

Passing None disables the Pool.

The default is enabled, with the default pool::Config.

Auto Trait Implementations§

§

impl<C, S> Freeze for ProxyConfig<C, S>
where <C as NetworkConnector>::Stream: Sized, C: Freeze, S: Freeze,

§

impl<C, S> RefUnwindSafe for ProxyConfig<C, S>

§

impl<C, S> Send for ProxyConfig<C, S>
where <C as NetworkConnector>::Stream: Sized,

§

impl<C, S> Sync for ProxyConfig<C, S>
where <C as NetworkConnector>::Stream: Sized,

§

impl<C, S> Unpin for ProxyConfig<C, S>
where <C as NetworkConnector>::Stream: Sized, C: Unpin, S: Unpin,

§

impl<C, S> UnwindSafe for ProxyConfig<C, S>

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

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>,

Source§

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.