pub struct Config {
pub base_url: String,
pub http: HttpClientConfig,
}Expand description
Configuration for the Curve API client
Fields§
§base_url: StringBase URL for the API
http: HttpClientConfigHTTP client configuration (timeout, proxy, user-agent)
Implementations§
Source§impl Config
impl Config
Sourcepub fn with_base_url(self, url: impl Into<String>) -> Self
pub fn with_base_url(self, url: impl Into<String>) -> Self
Set a custom base URL
Sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Set a custom timeout
Sourcepub fn with_proxy(self, proxy: impl Into<String>) -> Self
pub fn with_proxy(self, proxy: impl Into<String>) -> Self
Set a proxy URL
Sourcepub fn with_optional_proxy(self, proxy: Option<String>) -> Self
pub fn with_optional_proxy(self, proxy: Option<String>) -> Self
Set optional proxy URL
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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