#[non_exhaustive]pub enum TaskFailureCode {
Unspecified,
Application,
TimedOut,
Cancelled,
Terminated,
NonDeterminism,
PayloadTooLarge,
InvalidCommand,
}Expand description
The category of a task failure that reached the workflow, as
WorkflowError::TaskFailed carries it.
It mirrors the kernel protocol’s failure code. New categories may be added, so match with a wildcard arm.
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.
Unspecified
Not categorized, for example a failure journaled before failures carried a category, or one of a category this SDK does not know.
Application
The task’s code raised it.
TimedOut
A timeout expired.
Cancelled
The task was cancelled.
Terminated
The task was terminated, without cleanup.
NonDeterminism
The workflow’s code no longer replays its history.
PayloadTooLarge
A payload was over the engine’s size limit.
InvalidCommand
A command was malformed or not allowed.
Implementations§
Source§impl TaskFailureCode
impl TaskFailureCode
Sourcepub fn is_cancelled(self) -> bool
pub fn is_cancelled(self) -> bool
Whether the task was cancelled rather than failing on its own.
Sourcepub fn is_timed_out(self) -> bool
pub fn is_timed_out(self) -> bool
Whether a timeout expired.
Sourcepub fn is_application(self) -> bool
pub fn is_application(self) -> bool
Whether the task’s code raised it.
Trait Implementations§
Source§impl Clone for TaskFailureCode
impl Clone for TaskFailureCode
impl Copy for TaskFailureCode
Source§impl Debug for TaskFailureCode
impl Debug for TaskFailureCode
Source§impl Default for TaskFailureCode
impl Default for TaskFailureCode
Source§impl Display for TaskFailureCode
impl Display for TaskFailureCode
impl Eq for TaskFailureCode
Source§impl Hash for TaskFailureCode
impl Hash for TaskFailureCode
Source§impl PartialEq for TaskFailureCode
impl PartialEq for TaskFailureCode
impl StructuralPartialEq for TaskFailureCode
Auto Trait Implementations§
impl Forget for TaskFailureCode
impl Freeze for TaskFailureCode
impl Move for TaskFailureCode
impl RefUnwindSafe for TaskFailureCode
impl Send for TaskFailureCode
impl Sync for TaskFailureCode
impl Unpin for TaskFailureCode
impl UnsafeUnpin for TaskFailureCode
impl UnwindSafe for TaskFailureCode
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.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.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request