#[non_exhaustive]pub enum CloseReason {
Graceful,
PolicyDenied(Cow<'static, str>),
ProtocolError(Cow<'static, str>),
Cancelled,
}Expand description
Reason a connection closed. #[non_exhaustive] so new operator-
visible reasons (e.g. quota-hit, rate-limit-trip) can be added
without breaking downstream observers that pattern-match on the
enum.
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.
Graceful
PolicyDenied(Cow<'static, str>)
ProtocolError(Cow<'static, str>)
Cancelled
Daemon-initiated cancellation — listener force_cancel fired during
shutdown drain (spec/topology.md § Listener lifecycle), or any other
ctx.cancel.cancelled() propagation. Distinct from Graceful so
management observers can distinguish “client EOF’d” from “daemon
pulled the plug while in-flight.”
Trait Implementations§
Source§impl Clone for CloseReason
impl Clone for CloseReason
Source§fn clone(&self) -> CloseReason
fn clone(&self) -> CloseReason
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 moreAuto Trait Implementations§
impl Freeze for CloseReason
impl RefUnwindSafe for CloseReason
impl Send for CloseReason
impl Sync for CloseReason
impl Unpin for CloseReason
impl UnsafeUnpin for CloseReason
impl UnwindSafe for CloseReason
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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