pub enum SupervisorError {
InvalidName {
name: String,
},
FailedToInitialize {
child_name: String,
source: InitializationError,
},
Shutdown,
SignificantChildExited,
ShutdownTimedOut {
aborted: usize,
},
}Expand description
Supervisor errors.
Variants§
InvalidName
Supervisor or worker name is invalid.
FailedToInitialize
A child process failed to initialize.
This error indicates that a child couldn’t complete its async initialization. This is distinct from runtime failures and doesn’t trigger restart logic.
Fields
source: InitializationErrorThe underlying initialization error.
Shutdown
The supervisor exceeded its restart limits and was forced to shutdown.
SignificantChildExited
The supervisor shut down because a significant child terminated.
See AutoShutdown and ChildSpecification::with_significant. The supervisor stopped, and drained its remaining
children, because a child marked significant terminated without being restarted.
ShutdownTimedOut
The supervisor completed a requested shutdown, but one or more workers ignored graceful shutdown and had to be forcefully aborted after exceeding their shutdown timeout.
The shutdown itself was requested and otherwise orderly; this variant exists so that having to forcefully stop a worker is surfaced as a failure rather than reported as a clean shutdown. The count aggregates forced aborts across the entire supervision tree: a parent merges in the counts reported by any child supervisors that also timed out, so the value observed at the root supervisor is the total number of workers that had to be force-stopped tree-wide.
Trait Implementations§
Source§impl Debug for SupervisorError
impl Debug for SupervisorError
Source§impl Display for SupervisorError
impl Display for SupervisorError
Source§impl Error for SupervisorError
impl Error for SupervisorError
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
Source§impl ErrorCompat for SupervisorError
impl ErrorCompat for SupervisorError
Source§fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
Error::source. Read moreAuto Trait Implementations§
impl Freeze for SupervisorError
impl RefUnwindSafe for SupervisorError
impl Send for SupervisorError
impl Sync for SupervisorError
impl Unpin for SupervisorError
impl UnwindSafe for SupervisorError
Blanket Implementations§
Source§impl<T> AsErrorSource for Twhere
T: Error + 'static,
impl<T> AsErrorSource for Twhere
T: Error + 'static,
Source§fn as_error_source(&self) -> &(dyn Error + 'static)
fn as_error_source(&self) -> &(dyn Error + 'static)
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Track for T
impl<T> Track for T
§fn track_resources(self, token: ResourceGroupToken) -> Tracked<Self>
fn track_resources(self, token: ResourceGroupToken) -> Tracked<Self>
Tracked wrapper. Read more§fn in_current_resource_group(self) -> Tracked<Self>
fn in_current_resource_group(self) -> Tracked<Self>
Tracked wrapper. Read more