pub struct ClientBuilder { /* private fields */ }Expand description
Builder for Client. Requires credentials; host, timeout, retry budget,
and a caller-supplied reqwest::Client are optional.
Implementations§
Source§impl ClientBuilder
impl ClientBuilder
Sourcepub fn host(self, host: impl Into<String>) -> Self
pub fn host(self, host: impl Into<String>) -> Self
Overrides the base host (e.g. to point at a test server).
Sourcepub fn http_client(self, client: Client) -> Self
pub fn http_client(self, client: Client) -> Self
Supplies a preconfigured reqwest::Client (overrides timeout).
Sourcepub fn timeout(self, timeout: Duration) -> Self
pub fn timeout(self, timeout: Duration) -> Self
Sets the per-request timeout used when this builder constructs the
reqwest::Client itself.
Sourcepub fn max_retries(self, n: u32) -> Self
pub fn max_retries(self, n: u32) -> Self
Sets the maximum number of retries for retry-eligible requests
(ADR-0006). Defaults to 3.
Auto Trait Implementations§
impl !RefUnwindSafe for ClientBuilder
impl !UnwindSafe for ClientBuilder
impl Freeze for ClientBuilder
impl Send for ClientBuilder
impl Sync for ClientBuilder
impl Unpin for ClientBuilder
impl UnsafeUnpin 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