pub struct ClientBuilder { /* private fields */ }Expand description
Builder for Client. Obtain via Client::builder.
Implementations§
Source§impl ClientBuilder
impl ClientBuilder
Sourcepub fn timeout(self, timeout: Duration) -> Self
pub fn timeout(self, timeout: Duration) -> Self
Set the per-request HTTP timeout. Ignored if a custom reqwest::Client is
supplied via ClientBuilder::http_client (configure the timeout there instead).
Sourcepub fn admin_token(self, token: impl Into<String>) -> Self
pub fn admin_token(self, token: impl Into<String>) -> Self
Set the optional x-admin-token, sent on every request (it only affects
GET /v1/models, where it adds the per-model endpoints array).
Sourcepub fn http_client(self, client: Client) -> Self
pub fn http_client(self, client: Client) -> Self
Supply a fully pre-configured reqwest::Client (connection pools, proxies,
custom TLS, …). When set, the builder’s timeout is not applied — configure it on
the supplied 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 (const: unstable) · 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 !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