pub struct HyperConnectorBuilder { /* private fields */ }
Expand description
Builder for HyperConnector
.
Implementations§
source§impl HyperConnectorBuilder
impl HyperConnectorBuilder
sourcepub fn build<C>(self, tcp_connector: C) -> HyperConnector
pub fn build<C>(self, tcp_connector: C) -> HyperConnector
Create a HyperConnector
from this builder and a given connector.
sourcepub fn build_https(self) -> HyperConnector
pub fn build_https(self) -> HyperConnector
Create a HyperConnector
with the default rustls HTTPS implementation.
sourcepub fn sleep_impl(self, sleep_impl: impl AsyncSleep + 'static) -> Self
pub fn sleep_impl(self, sleep_impl: impl AsyncSleep + 'static) -> Self
Set the async sleep implementation used for timeouts
Calling this is only necessary for testing or to use something other than
default_async_sleep
.
sourcepub fn set_sleep_impl(
&mut self,
sleep_impl: Option<SharedAsyncSleep>,
) -> &mut Self
pub fn set_sleep_impl( &mut self, sleep_impl: Option<SharedAsyncSleep>, ) -> &mut Self
Set the async sleep implementation used for timeouts
Calling this is only necessary for testing or to use something other than
default_async_sleep
.
sourcepub fn connector_settings(
self,
connector_settings: HttpConnectorSettings,
) -> Self
pub fn connector_settings( self, connector_settings: HttpConnectorSettings, ) -> Self
Configure the HTTP settings for the HyperAdapter
sourcepub fn set_connector_settings(
&mut self,
connector_settings: Option<HttpConnectorSettings>,
) -> &mut Self
pub fn set_connector_settings( &mut self, connector_settings: Option<HttpConnectorSettings>, ) -> &mut Self
Configure the HTTP settings for the HyperAdapter
sourcepub fn hyper_builder(self, hyper_builder: Builder) -> Self
pub fn hyper_builder(self, hyper_builder: Builder) -> Self
Override the Hyper client Builder
used to construct this client.
This enables changing settings like forcing HTTP2 and modifying other default client behavior.
sourcepub fn set_hyper_builder(&mut self, hyper_builder: Option<Builder>) -> &mut Self
pub fn set_hyper_builder(&mut self, hyper_builder: Option<Builder>) -> &mut Self
Override the Hyper client Builder
used to construct this client.
This enables changing settings like forcing HTTP2 and modifying other default client behavior.
Trait Implementations§
source§impl Debug for HyperConnectorBuilder
impl Debug for HyperConnectorBuilder
source§impl Default for HyperConnectorBuilder
impl Default for HyperConnectorBuilder
source§fn default() -> HyperConnectorBuilder
fn default() -> HyperConnectorBuilder
Auto Trait Implementations§
impl Freeze for HyperConnectorBuilder
impl !RefUnwindSafe for HyperConnectorBuilder
impl Send for HyperConnectorBuilder
impl Sync for HyperConnectorBuilder
impl Unpin for HyperConnectorBuilder
impl !UnwindSafe for HyperConnectorBuilder
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more