pub struct ClientBuilder { /* private fields */ }
Expand description
A builder for Client
Implementations§
Source§impl ClientBuilder
impl ClientBuilder
Sourcepub fn pool_max_idle_per_host(&mut self, max_idle: usize) -> &mut Self
pub fn pool_max_idle_per_host(&mut self, max_idle: usize) -> &mut Self
Sets the maximum idle connection per host allowed in the pool.
Default is usize::MAX (no limit).
Sourcepub fn pool_idle_timeout(&mut self, val: Option<Duration>) -> &mut Self
pub fn pool_idle_timeout(&mut self, val: Option<Duration>) -> &mut Self
Set an optional timeout for idle sockets being kept-alive.
Pass None
to disable timeout.
Default is 90 seconds.
Sourcepub fn build<C: NetworkConnector>(&self, connector: C) -> Client
pub fn build<C: NetworkConnector>(&self, connector: C) -> Client
Combine the configuration of this builder with a connector to create a
Client
.
Trait Implementations§
Source§impl Clone for ClientBuilder
impl Clone for ClientBuilder
Source§fn clone(&self) -> ClientBuilder
fn clone(&self) -> ClientBuilder
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 Freeze for ClientBuilder
impl RefUnwindSafe for ClientBuilder
impl Send for ClientBuilder
impl Sync for ClientBuilder
impl Unpin for ClientBuilder
impl UnwindSafe for ClientBuilder
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