pub struct TimeoutConfig {
pub connect_timeout: Duration,
pub tls_timeout: Duration,
pub login_timeout: Duration,
pub command_timeout: Duration,
pub idle_timeout: Duration,
pub keepalive_interval: Option<Duration>,
}Expand description
Timeout configuration for various connection phases.
Per ARCHITECTURE.md §4.4, different phases of connection and command execution have separate timeout controls.
Fields§
§connect_timeout: DurationTime to establish TCP connection (default: 15s).
tls_timeout: DurationTime to complete TLS handshake (default: 10s).
login_timeout: DurationTime to complete login sequence (default: 30s).
command_timeout: DurationDefault timeout for command execution (default: 30s).
idle_timeout: DurationTime before idle connection is closed (default: 300s).
keepalive_interval: Option<Duration>Interval for connection keep-alive (default: 30s).
Implementations§
Source§impl TimeoutConfig
impl TimeoutConfig
Sourcepub fn connect_timeout(self, timeout: Duration) -> Self
pub fn connect_timeout(self, timeout: Duration) -> Self
Set the TCP connection timeout.
Sourcepub fn tls_timeout(self, timeout: Duration) -> Self
pub fn tls_timeout(self, timeout: Duration) -> Self
Set the TLS handshake timeout.
Sourcepub fn login_timeout(self, timeout: Duration) -> Self
pub fn login_timeout(self, timeout: Duration) -> Self
Set the login sequence timeout.
Sourcepub fn command_timeout(self, timeout: Duration) -> Self
pub fn command_timeout(self, timeout: Duration) -> Self
Set the default command execution timeout.
Sourcepub fn idle_timeout(self, timeout: Duration) -> Self
pub fn idle_timeout(self, timeout: Duration) -> Self
Set the idle connection timeout.
Sourcepub fn keepalive_interval(self, interval: Option<Duration>) -> Self
pub fn keepalive_interval(self, interval: Option<Duration>) -> Self
Set the keep-alive interval.
Sourcepub fn no_keepalive(self) -> Self
pub fn no_keepalive(self) -> Self
Disable keep-alive.
Sourcepub fn total_connect_timeout(&self) -> Duration
pub fn total_connect_timeout(&self) -> Duration
Get the total time allowed for a full connection (TCP + TLS + login).
Trait Implementations§
Source§impl Clone for TimeoutConfig
impl Clone for TimeoutConfig
Source§fn clone(&self) -> TimeoutConfig
fn clone(&self) -> TimeoutConfig
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 TimeoutConfig
impl Debug for TimeoutConfig
Auto Trait Implementations§
impl Freeze for TimeoutConfig
impl RefUnwindSafe for TimeoutConfig
impl Send for TimeoutConfig
impl Sync for TimeoutConfig
impl Unpin for TimeoutConfig
impl UnwindSafe for TimeoutConfig
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