pub struct ClientConfig {
pub base_url: String,
pub auth_token: Option<String>,
pub timeout_seconds: u64,
pub max_retries: usize,
pub user_agent: String,
}
Expand description
Client configuration
Fields§
§base_url: String
Base URL of the ContextLite server
auth_token: Option<String>
Authentication token
timeout_seconds: u64
Request timeout in seconds
max_retries: usize
Maximum number of retries for failed requests
user_agent: String
User agent string
Implementations§
Source§impl ClientConfig
impl ClientConfig
Sourcepub fn with_auth_token(self, token: impl Into<String>) -> Self
pub fn with_auth_token(self, token: impl Into<String>) -> Self
Set the authentication token
Sourcepub fn with_timeout(self, seconds: u64) -> Self
pub fn with_timeout(self, seconds: u64) -> Self
Set the request timeout
Sourcepub fn with_max_retries(self, retries: usize) -> Self
pub fn with_max_retries(self, retries: usize) -> Self
Set the maximum number of retries
Sourcepub fn with_user_agent(self, user_agent: impl Into<String>) -> Self
pub fn with_user_agent(self, user_agent: impl Into<String>) -> Self
Set a custom user agent
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