pub struct SessionConfig {
pub base_url: String,
pub timeout_seconds: u64,
pub user_agent: String,
}Expand description
Configuration for RainySessionClient.
Fields§
§base_url: StringBase URL of the Rainy API v3 service (host only; API paths are added by the client).
timeout_seconds: u64HTTP timeout in seconds for session requests.
user_agent: StringUser-Agent header used for session requests.
Implementations§
Source§impl SessionConfig
impl SessionConfig
Sourcepub fn with_base_url(self, base_url: impl Into<String>) -> Self
pub fn with_base_url(self, base_url: impl Into<String>) -> Self
Sets a custom base URL for the Rainy API service.
Sourcepub fn with_timeout(self, timeout_seconds: u64) -> Self
pub fn with_timeout(self, timeout_seconds: u64) -> Self
Sets a custom request timeout (seconds).
Sourcepub fn with_user_agent(self, user_agent: impl Into<String>) -> Self
pub fn with_user_agent(self, user_agent: impl Into<String>) -> Self
Sets a custom User-Agent header value.
Trait Implementations§
Source§impl Clone for SessionConfig
impl Clone for SessionConfig
Source§fn clone(&self) -> SessionConfig
fn clone(&self) -> SessionConfig
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 moreSource§impl Debug for SessionConfig
impl Debug for SessionConfig
Auto Trait Implementations§
impl Freeze for SessionConfig
impl RefUnwindSafe for SessionConfig
impl Send for SessionConfig
impl Sync for SessionConfig
impl Unpin for SessionConfig
impl UnsafeUnpin for SessionConfig
impl UnwindSafe for SessionConfig
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