pub struct Config {
pub api_key: SecretString,
pub base_url: String,
pub http: HttpClientConfig,
}Expand description
Configuration for the Dune API client
Fields§
§api_key: SecretStringAPI key for authentication (redacted in Debug output)
base_url: StringBase URL for the API
http: HttpClientConfigHTTP client configuration (timeout, proxy, user-agent)
Implementations§
Source§impl Config
impl Config
Sourcepub fn new(api_key: impl Into<String>) -> Self
pub fn new(api_key: impl Into<String>) -> Self
Create a new configuration with the given API key
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