pub struct Config {
pub base_url: Url,
pub timeout_secs: u64,
pub user_agent: String,
pub enable_logging: bool,
}Expand description
Client configuration
Fields§
§base_url: UrlBase URL for API requests
timeout_secs: u64Request timeout in seconds
user_agent: StringUser agent string
enable_logging: boolEnable request/response logging
Implementations§
Source§impl Config
impl Config
Sourcepub fn new(environment: Environment) -> Self
pub fn new(environment: Environment) -> Self
Create a new configuration with default values
Sourcepub fn with_timeout(self, timeout_secs: u64) -> Self
pub fn with_timeout(self, timeout_secs: u64) -> Self
Set the timeout
Sourcepub fn with_user_agent(self, user_agent: String) -> Self
pub fn with_user_agent(self, user_agent: String) -> Self
Set a custom user agent
Sourcepub fn with_logging(self, enable: bool) -> Self
pub fn with_logging(self, enable: bool) -> Self
Enable logging
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