pub struct RestClientBuilder { /* private fields */ }Expand description
Builder for constructing a RestClient.
Implementations§
Source§impl RestClientBuilder
impl RestClientBuilder
Sourcepub fn credentials(self, credentials: Credentials) -> Self
pub fn credentials(self, credentials: Credentials) -> Self
Set the API credentials.
Required for authenticated endpoints. Public endpoints can be accessed without credentials.
Sourcepub fn sandbox(self, enabled: bool) -> Self
pub fn sandbox(self, enabled: bool) -> Self
Enable sandbox mode.
When enabled, requests are sent to the Coinbase sandbox environment.
Sourcepub fn timeout(self, timeout: Duration) -> Self
pub fn timeout(self, timeout: Duration) -> Self
Set the request timeout.
Default is 30 seconds.
Sourcepub fn rate_limiting(self, enabled: bool) -> Self
pub fn rate_limiting(self, enabled: bool) -> Self
Enable or disable rate limiting.
When enabled, the client will automatically throttle requests to avoid hitting Coinbase API rate limits.
Sourcepub fn build(self) -> Result<RestClient>
pub fn build(self) -> Result<RestClient>
Build the REST client.
Trait Implementations§
Source§impl Clone for RestClientBuilder
impl Clone for RestClientBuilder
Source§fn clone(&self) -> RestClientBuilder
fn clone(&self) -> RestClientBuilder
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 RestClientBuilder
impl Debug for RestClientBuilder
Auto Trait Implementations§
impl Freeze for RestClientBuilder
impl RefUnwindSafe for RestClientBuilder
impl Send for RestClientBuilder
impl Sync for RestClientBuilder
impl Unpin for RestClientBuilder
impl UnwindSafe for RestClientBuilder
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