pub struct CloudClientBuilder { /* private fields */ }
Expand description
Builder for constructing a CloudClient with custom configuration
Provides a fluent interface for configuring API credentials, base URL, timeouts, and other client settings before creating the final CloudClient instance.
§Examples
use redis_cloud::CloudClient;
// Basic configuration
let client = CloudClient::builder()
.api_key("your-api-key")
.api_secret("your-api-secret")
.build()?;
// Advanced configuration
let client = CloudClient::builder()
.api_key("your-api-key")
.api_secret("your-api-secret")
.base_url("https://api.redislabs.com/v1".to_string())
.timeout(std::time::Duration::from_secs(120))
.build()?;
Implementations§
Source§impl CloudClientBuilder
impl CloudClientBuilder
Sourcepub fn api_secret(self, secret: impl Into<String>) -> Self
pub fn api_secret(self, secret: impl Into<String>) -> Self
Set the API secret
Sourcepub fn build(self) -> Result<CloudClient>
pub fn build(self) -> Result<CloudClient>
Build the client
Trait Implementations§
Source§impl Clone for CloudClientBuilder
impl Clone for CloudClientBuilder
Source§fn clone(&self) -> CloudClientBuilder
fn clone(&self) -> CloudClientBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for CloudClientBuilder
impl Debug for CloudClientBuilder
Auto Trait Implementations§
impl Freeze for CloudClientBuilder
impl RefUnwindSafe for CloudClientBuilder
impl Send for CloudClientBuilder
impl Sync for CloudClientBuilder
impl Unpin for CloudClientBuilder
impl UnwindSafe for CloudClientBuilder
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