pub struct ClientBuilder(/* private fields */);
Implementations§
source§impl ClientBuilder
impl ClientBuilder
sourcepub fn new() -> Self
pub fn new() -> Self
Constructs a new ClientBuilder
.
sourcepub fn user_agent(self, user_agent: impl Into<String>) -> Self
pub fn user_agent(self, user_agent: impl Into<String>) -> Self
Sets the user agent.
sourcepub fn append_default_header(
self,
name: HeaderName,
value: impl Into<HeaderValue>,
) -> Self
pub fn append_default_header( self, name: HeaderName, value: impl Into<HeaderValue>, ) -> Self
Append a default header.
sourcepub fn insert_default_header(
self,
name: HeaderName,
value: impl Into<HeaderValue>,
) -> Self
pub fn insert_default_header( self, name: HeaderName, value: impl Into<HeaderValue>, ) -> Self
Insert a default header.
sourcepub fn default_headers(self, headers: Headers) -> Self
pub fn default_headers(self, headers: Headers) -> Self
Add a list of headers.
sourcepub fn read_timeout(self, timeout: Option<Duration>) -> Self
pub fn read_timeout(self, timeout: Option<Duration>) -> Self
Sets the read timeout.
sourcepub fn write_timeout(self, timeout: Option<Duration>) -> Self
pub fn write_timeout(self, timeout: Option<Duration>) -> Self
Sets the write timeout.
Trait Implementations§
Auto 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