pub struct ClientBuilder { /* private fields */ }
Expand description
Builder for constructing a Client
with custom configuration.
This allows specifying the API region, base URL, credentials, and optionally
customizing the inner reqwest::ClientBuilder
.
Implementations§
Source§impl ClientBuilder
impl ClientBuilder
Source§impl ClientBuilder
impl ClientBuilder
Sourcepub fn set_region(&mut self, region: Region)
pub fn set_region(&mut self, region: Region)
Sets the API region.
Sourcepub fn with_region(self, region: Region) -> Self
pub fn with_region(self, region: Region) -> Self
Sets the API region and returns the modified builder.
Sourcepub fn set_base_url(&mut self, base_url: impl Into<Cow<'static, str>>)
pub fn set_base_url(&mut self, base_url: impl Into<Cow<'static, str>>)
Sets a custom base URL.
Sourcepub fn with_base_url(self, base_url: impl Into<Cow<'static, str>>) -> Self
pub fn with_base_url(self, base_url: impl Into<Cow<'static, str>>) -> Self
Sets a custom base URL and returns the modified builder.
Sourcepub fn set_client_builder(&mut self, client_builder: ClientBuilder)
pub fn set_client_builder(&mut self, client_builder: ClientBuilder)
Sets a custom reqwest::ClientBuilder
.
Sourcepub fn with_client_builder(self, client_builder: ClientBuilder) -> Self
pub fn with_client_builder(self, client_builder: ClientBuilder) -> Self
Sets a custom reqwest::ClientBuilder
and returns the modified builder.
Sourcepub fn set_credentials(&mut self, credentials: Credentials)
pub fn set_credentials(&mut self, credentials: Credentials)
Sets the credentials for API authentication.
Sourcepub fn with_credentials(self, credentials: Credentials) -> Self
pub fn with_credentials(self, credentials: Credentials) -> Self
Sets the credentials and returns the modified builder.
Trait Implementations§
Source§impl Debug for ClientBuilder
impl Debug for ClientBuilder
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