pub struct ClientConfig {
pub api_key: Option<SecureApiKey>,
pub base_url: Url,
pub http_referer: Option<String>,
pub site_title: Option<String>,
pub user_id: Option<String>,
pub timeout: Duration,
pub retry_config: RetryConfig,
}
Expand description
Client configuration containing API key, base URL, and additional settings.
Fields§
§api_key: Option<SecureApiKey>
§base_url: Url
§http_referer: Option<String>
§site_title: Option<String>
§user_id: Option<String>
§timeout: Duration
§retry_config: RetryConfig
Implementations§
Source§impl ClientConfig
impl ClientConfig
Sourcepub fn build_headers(&self) -> Result<HeaderMap>
pub fn build_headers(&self) -> Result<HeaderMap>
Build HTTP headers required for making API calls. Returns an error if any header value cannot be constructed.
Trait Implementations§
Source§impl Clone for ClientConfig
impl Clone for ClientConfig
Source§fn clone(&self) -> ClientConfig
fn clone(&self) -> ClientConfig
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 moreAuto Trait Implementations§
impl Freeze for ClientConfig
impl RefUnwindSafe for ClientConfig
impl Send for ClientConfig
impl Sync for ClientConfig
impl Unpin for ClientConfig
impl UnwindSafe for ClientConfig
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