#[non_exhaustive]
pub enum ConnectionClosedReason {
Stale,
Idle,
Error,
Dropped,
PoolClosed,
}
Expand description
The reasons that a connection may be closed.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Stale
The connection pool has been cleared since the connection was created.
Idle
The connection has been available for longer than max_idle_time
without being used.
Error
An error occurred while using the connection.
Dropped
The connection was dropped during read or write.
PoolClosed
The pool that the connection belongs to has been closed.
Trait Implementations
sourceimpl Clone for ConnectionClosedReason
impl Clone for ConnectionClosedReason
sourcefn clone(&self) -> ConnectionClosedReason
fn clone(&self) -> ConnectionClosedReason
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for ConnectionClosedReason
impl Debug for ConnectionClosedReason
sourceimpl<'de> Deserialize<'de> for ConnectionClosedReason
impl<'de> Deserialize<'de> for ConnectionClosedReason
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl PartialEq<ConnectionClosedReason> for ConnectionClosedReason
impl PartialEq<ConnectionClosedReason> for ConnectionClosedReason
sourcefn eq(&self, other: &ConnectionClosedReason) -> bool
fn eq(&self, other: &ConnectionClosedReason) -> bool
sourceimpl Serialize for ConnectionClosedReason
impl Serialize for ConnectionClosedReason
impl StructuralPartialEq for ConnectionClosedReason
Auto Trait Implementations
impl RefUnwindSafe for ConnectionClosedReason
impl Send for ConnectionClosedReason
impl Sync for ConnectionClosedReason
impl Unpin for ConnectionClosedReason
impl UnwindSafe for ConnectionClosedReason
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more