#[non_exhaustive]pub enum RuntimeError {
#[non_exhaustive] GraceExceeded {
grace: Duration,
stuck: Vec<Arc<str>>,
},
#[non_exhaustive] TaskAlreadyExists {
name: Arc<str>,
},
CommandQueueFull,
#[non_exhaustive] TaskTerminationTimeout {
id: TaskId,
timeout: Duration,
},
#[non_exhaustive] SignalSetupFailed {
source: Error,
},
ShuttingDown,
AlreadyRunning,
}Expand description
Errors from supervisor lifecycle and management operations.
These errors come from add, remove, cancel, shutdown, and run operations.
They are separate from TaskError, which comes from a task attempt.
Match with a wildcard arm because this enum is non-exhaustive.
Data-carrying variants are also non-exhaustive; include .. when matching their fields.
§Also
Supervisor- returnsRuntimeErrorfromrunSupervisorHandle- returnsRuntimeErrorfrom management methodsControllerError- errors from optional controller configuration andsubmit*methods
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
#[non_exhaustive]GraceExceeded
Shutdown grace period was exceeded.
Some managed task runners did not stop in time and were force-terminated. Work detached by user code is outside this guarantee.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]TaskAlreadyExists
A task name is already registered or repeated in an all-or-nothing batch.
Fields
This variant is marked as non-exhaustive
CommandQueueFull
A bounded management command queue has no free capacity.
A fail-fast management call could not enqueue its requested state change. That request does not change task or slot ownership.
#[non_exhaustive]TaskTerminationTimeout
Timed out while waiting for terminal registry cleanup.
The stop request remains active. This error only ends the caller’s wait; it does not undo cancellation or change the supervisor grace period.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]SignalSetupFailed
OS signal listener setup failed.
Signal-based shutdown is unavailable. The I/O error kind, message, and source chain are preserved for callers that join the shared shutdown operation.
Fields
This variant is marked as non-exhaustive
ShuttingDown
The runtime is shutting down and no longer accepts commands.
AlreadyRunning
Supervisor::run was called more than once.
A supervisor run is single-shot.
Implementations§
Trait Implementations§
Source§impl Debug for RuntimeError
impl Debug for RuntimeError
Source§impl Display for RuntimeError
impl Display for RuntimeError
Source§impl Error for RuntimeError
impl Error for RuntimeError
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()