pub enum Error<E: Error + 'static> {
ControllerError(E),
FinalizerError(Error<E>),
}Expand description
An error from a reconciliation pass, as passed to
Context::error_action and Context::failure_event.
Variants§
ControllerError(E)
Context::apply returned an error, and the context has no
finalizer.
FinalizerError(Error<E>)
The context has a finalizer, and either Context::apply or
Context::cleanup returned an error (wrapped as
ApplyFailed or
CleanupFailed), or
adding or removing the finalizer failed.
Implementations§
Source§impl<E: Error + 'static> Error<E>
impl<E: Error + 'static> Error<E>
Sourcepub fn display_chain(&self) -> String
pub fn display_chain(&self) -> String
Renders this error followed by each of its causes, separated by
": ", as used in the note of the default
failure event.
Sourcepub fn is_conflict(&self) -> bool
pub fn is_conflict(&self) -> bool
Whether the API server rejected a write because the object changed since the controller read it. Retrying against the newer version resolves this on its own.
This covers a 409 Conflict anywhere in the source chain, for
instance from a replace with a stale resourceVersion, and a failed
test operation in the JSON patch that adds or removes the finalizer.
Trait Implementations§
Source§impl<E> Error for Error<E>
impl<E> Error for Error<E>
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl<E> !Freeze for Error<E>
impl<E> !RefUnwindSafe for Error<E>
impl<E> !UnwindSafe for Error<E>
impl<E> Send for Error<E>
impl<E> Sync for Error<E>
impl<E> Unpin for Error<E>
impl<E> UnsafeUnpin for Error<E>
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> 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