#[non_exhaustive]pub enum Outcome {
Completed(TaskStatus),
Failed {
status: TaskStatus,
class: FailureClass,
},
Canceled(TaskStatus),
Interrupted(TaskStatus),
Message(Message),
Lost(Option<ClientError>),
Unreachable,
CancelRequested(TaskStatus),
CancelFailed(ClientError),
HandedOff,
}Expand description
What became of a delegated task.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Completed(TaskStatus)
The child completed.
Failed
The child failed or was rejected (status.state says which), with
the class it declared, or FailureClass::Internal if it declared
none.
Canceled(TaskStatus)
The child reached canceled; cancel_cause
says who stopped it, when its server said.
Interrupted(TaskStatus)
The child is waiting for the parent: input-required or
auth-required. It was not cancelled; continue it by sending a
message with its task id, or cancel it.
Message(Message)
The agent answered with a message and created no task.
Lost(Option<ClientError>)
The child’s stream failed or ended before the child settled, and
could not be resumed (see ResumePolicy). The
child, if its id was known, was sent CancelTask.
Unreachable
A cancel was asked for, but the child’s id was never learned within
the wait, so no CancelTask could be sent. A child may be running.
CancelRequested(TaskStatus)
CancelTask was accepted, but the task it returned is not yet in a
terminal state; the agent stops the child asynchronously.
CancelFailed(ClientError)
CancelTask was sent and refused or failed.
HandedOff
The supervisor was shut down and handed the child over: the child was
left running and its journal record left open, at the position the
stream had reached, for the next supervisor to find with
DelegationJournal::open and Delegation::reattach.
See Delegation::wait_or_hand_off.
Implementations§
Source§impl Outcome
impl Outcome
Sourcepub fn cancel_cause(&self) -> Option<CancelCause>
pub fn cancel_cause(&self) -> Option<CancelCause>
Who stopped a Canceled child: a CancelTask, an
operator’s halt or a lapsed lease (extension cancel/v1). None for
any other outcome, and for a canceled status that names no cause this
version knows, as one from another SDK does: never guessed.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Outcome
impl !UnwindSafe for Outcome
impl Forget for Outcome
impl Freeze for Outcome
impl Move for Outcome
impl Send for Outcome
impl Sync for Outcome
impl Unpin for Outcome
impl UnsafeUnpin for Outcome
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].