pub struct HttpClientBuilder<T> { /* private fields */ }
Expand description
Implements the Builder pattern for constructing HTTP or HTTPS clients.
Implementations§
Source§impl HttpClientBuilder<HttpClient>
impl HttpClientBuilder<HttpClient>
Sourcepub fn build(self) -> HttpClient
pub fn build(self) -> HttpClient
Constructs an HttpClient
Source§impl HttpClientBuilder<HttpsClient>
impl HttpClientBuilder<HttpsClient>
Sourcepub fn build(self) -> HttpsClient
pub fn build(self) -> HttpsClient
Constructs an HttpsClient
Sourcepub fn tls(self, tls: ClientConfig) -> Self
pub fn tls(self, tls: ClientConfig) -> Self
Overrides the default tls ClientConfig
Source§impl<T> HttpClientBuilder<T>
impl<T> HttpClientBuilder<T>
Sourcepub fn tcp_options(self, tcp_options: TcpOptions) -> Self
pub fn tcp_options(self, tcp_options: TcpOptions) -> Self
Sets the TCP options for the underlying HyperConnector
Sourcepub fn socket_options(self, socket_options: SocketOptions) -> Self
pub fn socket_options(self, socket_options: SocketOptions) -> Self
Sets the SocketOptions for the underlying HyperConnector
Trait Implementations§
Source§impl<T: Clone> Clone for HttpClientBuilder<T>
impl<T: Clone> Clone for HttpClientBuilder<T>
Source§fn clone(&self) -> HttpClientBuilder<T>
fn clone(&self) -> HttpClientBuilder<T>
Returns a duplicate 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 moreAuto Trait Implementations§
impl<T> Freeze for HttpClientBuilder<T>
impl<T> !RefUnwindSafe for HttpClientBuilder<T>
impl<T> Send for HttpClientBuilder<T>where
T: Send,
impl<T> Sync for HttpClientBuilder<T>where
T: Sync,
impl<T> Unpin for HttpClientBuilder<T>where
T: Unpin,
impl<T> !UnwindSafe for HttpClientBuilder<T>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoAny for T
impl<T> IntoAny for T
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>
Converts
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>
Converts
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§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T, U> TryIntoExt<U> for Twhere
U: TryFromExt<T>,
impl<T, U> TryIntoExt<U> for Twhere
U: TryFromExt<T>,
type Error = <U as TryFromExt<T>>::Error
Source§fn try_into_ext(self) -> Result<U, <T as TryIntoExt<U>>::Error>
fn try_into_ext(self) -> Result<U, <T as TryIntoExt<U>>::Error>
Tries to perform the conversion.