Struct aws_smithy_runtime::client::http::hyper_014::HyperClientBuilder
source · pub struct HyperClientBuilder { /* private fields */ }
Available on crate features
client
and connector-hyper-0-14-x
only.Expand description
Builder for a hyper-backed HttpClient
implementation.
This builder can be used to customize the underlying TCP connector used, as well as hyper client configuration.
Implementations§
source§impl HyperClientBuilder
impl HyperClientBuilder
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.
sourcepub fn build_https(self) -> SharedHttpClient
Available on crate feature tls-rustls
only.
pub fn build_https(self) -> SharedHttpClient
tls-rustls
only.Create a HyperConnector
with the default rustls HTTPS implementation.
sourcepub fn build<C>(self, tcp_connector: C) -> SharedHttpClientwhere
C: Clone + Send + Sync + 'static + Service<Uri>,
C::Response: Connection + AsyncRead + AsyncWrite + Send + Unpin + 'static,
C::Future: Unpin + Send + 'static,
C::Error: Into<BoxError>,
pub fn build<C>(self, tcp_connector: C) -> SharedHttpClientwhere C: Clone + Send + Sync + 'static + Service<Uri>, C::Response: Connection + AsyncRead + AsyncWrite + Send + Unpin + 'static, C::Future: Unpin + Send + 'static, C::Error: Into<BoxError>,
Create a SharedHttpClient
from this builder and a given connector.
Use build_https
if you don’t want to provide a custom TCP connector.
Trait Implementations§
source§impl Clone for HyperClientBuilder
impl Clone for HyperClientBuilder
source§fn clone(&self) -> HyperClientBuilder
fn clone(&self) -> HyperClientBuilder
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for HyperClientBuilder
impl Debug for HyperClientBuilder
source§impl Default for HyperClientBuilder
impl Default for HyperClientBuilder
source§fn default() -> HyperClientBuilder
fn default() -> HyperClientBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for HyperClientBuilder
impl Send for HyperClientBuilder
impl Sync for HyperClientBuilder
impl Unpin for HyperClientBuilder
impl !UnwindSafe for HyperClientBuilder
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
Mutably borrows from an owned value. Read more
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>
Creates a shared type from an unshared type.