pub struct HyperClientBuilder<Crypto = CryptoUnset> { /* private fields */ }
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.
§Examples
Construct a Hyper client with the RusTLS TLS implementation. This can be useful when you want to share a Hyper connector between multiple generated Smithy clients.
Implementations§
source§impl HyperClientBuilder<CryptoProviderSelected>
impl HyperClientBuilder<CryptoProviderSelected>
sourcepub fn build_https(self) -> SharedHttpClient
pub fn build_https(self) -> SharedHttpClient
Create a hyper client using RusTLS for TLS
The trusted certificates will be loaded later when this becomes the selected HTTP client for a Smithy client.
Examples found in repository?
More examples
sourcepub fn build_with_resolver(
self,
resolver: impl ResolveDns + Clone + 'static
) -> SharedHttpClient
pub fn build_with_resolver( self, resolver: impl ResolveDns + Clone + 'static ) -> SharedHttpClient
Create a hyper client using a custom DNS resolver
source§impl HyperClientBuilder<CryptoUnset>
impl HyperClientBuilder<CryptoUnset>
sourcepub fn crypto_mode(
self,
provider: CryptoMode
) -> HyperClientBuilder<CryptoProviderSelected>
pub fn crypto_mode( self, provider: CryptoMode ) -> HyperClientBuilder<CryptoProviderSelected>
Examples found in repository?
More examples
Trait Implementations§
source§impl<Crypto: Clone> Clone for HyperClientBuilder<Crypto>
impl<Crypto: Clone> Clone for HyperClientBuilder<Crypto>
source§fn clone(&self) -> HyperClientBuilder<Crypto>
fn clone(&self) -> HyperClientBuilder<Crypto>
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<Crypto: Debug> Debug for HyperClientBuilder<Crypto>
impl<Crypto: Debug> Debug for HyperClientBuilder<Crypto>
source§impl<Crypto: Default> Default for HyperClientBuilder<Crypto>
impl<Crypto: Default> Default for HyperClientBuilder<Crypto>
source§fn default() -> HyperClientBuilder<Crypto>
fn default() -> HyperClientBuilder<Crypto>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<Crypto> Freeze for HyperClientBuilder<Crypto>where
Crypto: Freeze,
impl<Crypto = CryptoUnset> !RefUnwindSafe for HyperClientBuilder<Crypto>
impl<Crypto> Send for HyperClientBuilder<Crypto>where
Crypto: Send,
impl<Crypto> Sync for HyperClientBuilder<Crypto>where
Crypto: Sync,
impl<Crypto> Unpin for HyperClientBuilder<Crypto>where
Crypto: Unpin,
impl<Crypto = CryptoUnset> !UnwindSafe for HyperClientBuilder<Crypto>
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.