pub enum CancelCode {
User,
Timeout,
ParentDropped,
SystemShutdown,
Internal,
}Expand description
Categorized cause of a cancellation.
This is a closed enum — #[non_exhaustive] is intentionally absent so that
exhaustive match is enforced on consumers (design-v1.md §2).
No forceful kill variants (e.g., Aborted, Killed, ForcedExit) are included;
all cancellation in this design is cooperative (crux: Cooperative cancellation
4-checkpoint).
Variants§
User
Requested explicitly by a human or calling client.
Timeout
A deadline or time budget was exceeded.
ParentDropped
The parent context (e.g., the service instance) was dropped.
SystemShutdown
The process is shutting down gracefully.
Internal
Internal engine policy triggered cancellation.
Trait Implementations§
Source§impl Clone for CancelCode
impl Clone for CancelCode
Source§fn clone(&self) -> CancelCode
fn clone(&self) -> CancelCode
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 moreimpl Copy for CancelCode
Source§impl Debug for CancelCode
impl Debug for CancelCode
Source§impl<'de> Deserialize<'de> for CancelCode
impl<'de> Deserialize<'de> for CancelCode
Source§fn 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
impl Eq for CancelCode
Source§impl PartialEq for CancelCode
impl PartialEq for CancelCode
Source§fn eq(&self, other: &CancelCode) -> bool
fn eq(&self, other: &CancelCode) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for CancelCode
impl Serialize for CancelCode
impl StructuralPartialEq for CancelCode
Auto Trait Implementations§
impl Freeze for CancelCode
impl RefUnwindSafe for CancelCode
impl Send for CancelCode
impl Sync for CancelCode
impl Unpin for CancelCode
impl UnsafeUnpin for CancelCode
impl UnwindSafe for CancelCode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.