pub struct SpotRestClientBuilder { /* private fields */ }Expand description
Builder for SpotRestClient.
Implementations§
Source§impl SpotRestClientBuilder
impl SpotRestClientBuilder
Sourcepub fn base_url(self, url: impl Into<String>) -> Self
pub fn base_url(self, url: impl Into<String>) -> Self
Set the base URL (useful for testing with a mock server).
Sourcepub fn credentials(self, credentials: Arc<dyn CredentialsProvider>) -> Self
pub fn credentials(self, credentials: Arc<dyn CredentialsProvider>) -> Self
Set the credentials provider for authenticated requests.
Sourcepub fn nonce_provider(self, provider: Arc<dyn NonceProvider>) -> Self
pub fn nonce_provider(self, provider: Arc<dyn NonceProvider>) -> Self
Set a custom nonce provider.
Sourcepub fn user_agent(self, user_agent: impl Into<String>) -> Self
pub fn user_agent(self, user_agent: impl Into<String>) -> Self
Set a custom user agent.
Sourcepub fn max_retries(self, retries: u32) -> Self
pub fn max_retries(self, retries: u32) -> Self
Set the maximum number of retries for transient failures.
Sourcepub fn build(self) -> SpotRestClient
pub fn build(self) -> SpotRestClient
Build the client.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SpotRestClientBuilder
impl !RefUnwindSafe for SpotRestClientBuilder
impl Send for SpotRestClientBuilder
impl Sync for SpotRestClientBuilder
impl Unpin for SpotRestClientBuilder
impl !UnwindSafe for SpotRestClientBuilder
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