pub struct StandardClientBuilder { /* private fields */ }Expand description
A reqwest-like builder for a standard client, including Hyper pool tuning.
Implementations§
Source§impl StandardClientBuilder
impl StandardClientBuilder
Enable or disable the automatic cookie store.
Sourcepub fn default_headers(self, headers: HeaderMap) -> Self
pub fn default_headers(self, headers: HeaderMap) -> Self
Set headers added to requests that do not already contain them.
Sourcepub fn pool_idle_timeout<D>(self, timeout: D) -> Self
pub fn pool_idle_timeout<D>(self, timeout: D) -> Self
Set how long idle pooled connections remain available for reuse.
Pass None to disable the idle timeout.
Sourcepub fn pool_max_idle_per_host(self, max: usize) -> Self
pub fn pool_max_idle_per_host(self, max: usize) -> Self
Set the maximum number of idle connections retained per host.
Sourcepub fn build(self) -> StandardClient
pub fn build(self) -> StandardClient
Build the client and its shared Hyper connection pool.
Auto Trait Implementations§
impl Freeze for StandardClientBuilder
impl RefUnwindSafe for StandardClientBuilder
impl Send for StandardClientBuilder
impl Sync for StandardClientBuilder
impl Unpin for StandardClientBuilder
impl UnsafeUnpin for StandardClientBuilder
impl UnwindSafe for StandardClientBuilder
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