#[non_exhaustive]pub enum RuntimeError {
TokioRuntimeUnavailable,
#[non_exhaustive] ThreadStartFailed {
component: &'static str,
source: Error,
},
#[non_exhaustive] GraceExceeded {
grace: Duration,
stuck: Vec<Arc<str>>,
},
#[non_exhaustive] TaskAlreadyExists {
name: Arc<str>,
},
#[non_exhaustive] ResourceLimitReached {
resource: &'static str,
limit: usize,
},
CommandQueueFull,
#[non_exhaustive] TaskTerminationTimeout {
id: TaskId,
timeout: Duration,
},
#[non_exhaustive] OutcomeUnavailable {
id: TaskId,
},
#[non_exhaustive] SignalSetupFailed {
source: Error,
},
ShuttingDown,
AlreadyRunning,
}Expand description
Failure of a supervisor lifecycle or management operation.
Runtime startup, static runs, dynamic management, outcome waiting, and shutdown return this type.
Task attempts return TaskError instead. This enum and its data-carrying variants are non-exhaustive;
keep a fallback arm and use .. when matching fields.
§See also
Errorcombines runtime and feature-gated controller errors.ControllerError- controller availability and submission intake errors
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Runtime startup was requested without an active Tokio runtime.
The supervisor remains stopped and startup may be retried from inside a Tokio runtime.
#[non_exhaustive]ThreadStartFailed
A required Taskvisor worker thread could not start.
The operation that needed the worker remains uncommitted. The source identifies the failed thread-creation or startup handshake.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]GraceExceeded
Task cleanup did not finish within the shared shutdown grace period.
A listed name belongs to an actor that required logical force-abort or a removal owner still finishing at the deadline. A force-aborted actor can remain physically active under Taskvisor’s cleanup ownership after this error is returned.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]TaskAlreadyExists
A task name is already reserved or repeated in an atomic static batch.
Registry membership and cleanup ownership of a physically active force-aborted actor can both reserve a name.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]ResourceLimitReached
A configured runtime or user-lifetime budget was exhausted.
Fields
This variant is marked as non-exhaustive
CommandQueueFull
A fail-fast management call found its command queue full.
The rejected request does not change task or controller-slot ownership.
#[non_exhaustive]TaskTerminationTimeout
The caller’s bounded wait for terminal registry cleanup expired.
The stop request remains active. This error does not undo cancellation or change the supervisor’s shutdown grace period.
Fields
This variant is marked as non-exhaustive
A watched task or controller submission’s direct outcome channel closed without a result.
#[non_exhaustive]SignalSetupFailed
Explicit operating-system signal setup failed.
This can only come from Supervisor::run_with_os_signals.
Every caller joining that shared shutdown receives an equivalent source.
Fields
This variant is marked as non-exhaustive
ShuttingDown
The runtime is shutting down and no longer accepts commands.
AlreadyRunning
A static run tried to acquire an already owned or committed lifecycle.
Supervisor::run,
Supervisor::run_until, and
Supervisor::run_with_os_signals
share one single-shot lifecycle.
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()