pub struct ApiClientBuilder { /* private fields */ }Expand description
Builder for ApiClient.
Implementations§
Source§impl ApiClientBuilder
impl ApiClientBuilder
Sourcepub fn new(base_url: impl Into<String>) -> Self
pub fn new(base_url: impl Into<String>) -> Self
Creates a builder with the default SDK identity.
Sourcepub fn identity(self, identity: ClientIdentity) -> Self
pub fn identity(self, identity: ClientIdentity) -> Self
Sets the client identity used for default HTTP headers and user agent.
Sourcepub fn http_client(self, http: Client) -> Self
pub fn http_client(self, http: Client) -> Self
Uses a caller-provided reqwest client.
When this is set, the SDK does not inject identity headers into that client and does not apply request timeout settings; configure them before passing the client if needed.
Sourcepub fn request_timeout(self, timeout: Duration) -> Self
pub fn request_timeout(self, timeout: Duration) -> Self
Sets the timeout for API HTTP requests made by SDK-created clients.
Sourcepub fn without_request_timeout(self) -> Self
pub fn without_request_timeout(self) -> Self
Disables the SDK default API request timeout.
Trait Implementations§
Source§impl Clone for ApiClientBuilder
impl Clone for ApiClientBuilder
Source§fn clone(&self) -> ApiClientBuilder
fn clone(&self) -> ApiClientBuilder
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 ApiClientBuilder
impl !UnwindSafe for ApiClientBuilder
impl Freeze for ApiClientBuilder
impl Send for ApiClientBuilder
impl Sync for ApiClientBuilder
impl Unpin for ApiClientBuilder
impl UnsafeUnpin for ApiClientBuilder
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