#[non_exhaustive]pub enum Outcome {
Completed,
Waiting,
Skipped,
Failed,
Abandoned,
}Expand description
What a reconciliation pass, or a step of one, concluded.
as_str gives the value used as a metric label, which
is stable.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Completed
Brought what it manages to the desired state, or found it already there.
Waiting
Made progress, but the desired state has not been reached yet, and asked to be run again to continue.
Skipped
Had nothing to do, for instance because what it manages is disabled by configuration. Never inferred; reconcilers must report it explicitly.
Failed
Returned an error.
Abandoned
Stopped without reaching a conclusion: either the reconciliation was
cancelled (for instance because leadership was lost, or the process
is shutting down), or, for a Step, an error propagated out of it
before it was finished.
Implementations§
Source§impl Outcome
impl Outcome
Sourcepub fn of_result<E>(result: &Result<Option<Action>, E>) -> Self
pub fn of_result<E>(result: &Result<Option<Action>, E>) -> Self
Classifies a result in the form returned by
Context::apply and
Context::cleanup:
Ok(None)andOk(Some(Action::await_change()))areCompleted, since there is nothing more to do until something changes.- Any other
Ok(Some(action))isWaiting, since the reconciler asked to be run again. Err(_)isFailed.
A reconciler that returns a requeue action as a periodic resync after
having fully converged will therefore be reported as waiting, and
should override that with TraceMetadata::set_outcome.
Trait Implementations§
impl Copy for Outcome
impl Eq for Outcome
impl StructuralPartialEq for Outcome
Auto Trait Implementations§
impl Freeze for Outcome
impl RefUnwindSafe for Outcome
impl Send for Outcome
impl Sync for Outcome
impl Unpin for Outcome
impl UnsafeUnpin for Outcome
impl UnwindSafe for Outcome
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
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§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
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> 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