pub struct HttpClientConfig {
pub base_url: String,
pub api_key: Option<String>,
pub timeout_secs: u64,
}
Expand description
Configuration for the HTTP client.
Fields§
§base_url: String
Base URL/prefix for all outgoing requests.
api_key: Option<String>
API key to append to requests.
The key will be inserted into the X-API-Key
header.
timeout_secs: u64
Timeout for client requests in seconds.
Trait Implementations§
Source§impl Clone for HttpClientConfig
impl Clone for HttpClientConfig
Source§fn clone(&self) -> HttpClientConfig
fn clone(&self) -> HttpClientConfig
Returns a copy 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 ConfigExampleSnippet for HttpClientConfig
impl ConfigExampleSnippet for HttpClientConfig
Source§fn config_example_snippet() -> String
fn config_example_snippet() -> String
Returns the configuration example snippet to be used
in new configuration files.
Source§impl Default for HttpClientConfig
impl Default for HttpClientConfig
Source§impl<'de> Deserialize<'de> for HttpClientConfigwhere
HttpClientConfig: Default,
impl<'de> Deserialize<'de> for HttpClientConfigwhere
HttpClientConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for HttpClientConfig
impl RefUnwindSafe for HttpClientConfig
impl Send for HttpClientConfig
impl Sync for HttpClientConfig
impl Unpin for HttpClientConfig
impl UnwindSafe for HttpClientConfig
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