pub struct ClientBuilder { /* private fields */ }Expand description
A builder for constructing a Client instance with customizable options.
The ClientBuilder allows you to configure the API key, timeout, and host
for the Client before building it.
§Examples
ⓘ
let client = ClientBuilder::new("your_api_key".to_string())
.timeout(30)
.build()
.expect("Failed to build client");Implementations§
Source§impl ClientBuilder
impl ClientBuilder
Sourcepub fn build(self) -> Result<Client>
pub fn build(self) -> Result<Client>
Builds the Client instance using the configured options.
§Returns
A Result containing the constructed Client on success, or an error
if the client could not be built.
§Errors
This method will return an error if the underlying reqwest::blocking::ClientBuilder
fails to build the client.
§Examples
ⓘ
let client = ClientBuilder::new("your_api_key".to_string())
.timeout(30)
.build()
.expect("Failed to build client");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