pub struct SessionConfig {
pub request_timeout: Option<Duration>,
pub max_retries: u32,
pub retry_delay: Duration,
}Expand description
Configuration for timeouts and retries.
Fields§
§request_timeout: Option<Duration>Maximum time to wait for a response before retrying or failing.
max_retries: u32Maximum number of retry attempts for transient errors.
retry_delay: DurationDelay between retry attempts.
Implementations§
Source§impl SessionConfig
impl SessionConfig
Sourcepub fn with_request_timeout(self, timeout: Duration) -> Self
pub fn with_request_timeout(self, timeout: Duration) -> Self
Sets the request timeout.
Sourcepub fn with_max_retries(self, retries: u32) -> Self
pub fn with_max_retries(self, retries: u32) -> Self
Sets the maximum number of retries.
Sourcepub fn with_retry_delay(self, delay: Duration) -> Self
pub fn with_retry_delay(self, delay: Duration) -> Self
Sets the delay between retries.
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 (const: unstable) · 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