Skip to main content

RustvelloError

Enum RustvelloError 

Source
#[non_exhaustive]
pub enum RustvelloError {
Show 17 variants Retry { reason: String, }, ConcurrencyRetry { task_id: TaskId, reason: String, }, Serialization { message: String, }, TaskNotFound { task_id: TaskId, }, TaskNotRegistered { task_id: TaskId, }, CycleDetected { task_id: TaskId, message: String, }, RunnerNotExecutable { task_id: TaskId, message: String, }, TaskClassNotFound { task_id: TaskId, }, InvocationNotFound { invocation_id: InvocationId, }, InvalidStatusTransition { invocation_id: InvocationId, from_status: InvocationStatus, to_status: InvocationStatus, allowed_statuses: Vec<InvocationStatus>, }, OwnershipViolation { invocation_id: InvocationId, from_status: InvocationStatus, to_status: InvocationStatus, current_owner: String, attempted_owner: String, reason: String, }, StatusRaceCondition { invocation_id: InvocationId, previous_status: InvocationStatus, expected_status: InvocationStatus, actual_status: InvocationStatus, }, TaskExecution { error_type: String, message: String, traceback: Option<String>, }, Infrastructure { kind: InfraErrorKind, message: String, source: Option<Box<dyn Error + Send + Sync>>, }, Configuration { message: String, }, Internal { message: String, }, NotSupported { backend: String, method: String, },
}
Expand description

Root error type — mirrors pynenc’s exception hierarchy.

Each variant maps 1:1 to a pynenc exception class (see 302 §4).

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Retry

Task explicitly requested a retry

Fields

§reason: String
§

ConcurrencyRetry

Concurrency control triggered a retry

Fields

§task_id: TaskId
§reason: String
§

Serialization

Serialization/deserialization error

Fields

§message: String
§

TaskNotFound

Task definition not found in any registry

Fields

§task_id: TaskId
§

TaskNotRegistered

Task exists but is not registered in this app instance

Fields

§task_id: TaskId
§

CycleDetected

Dependency cycle detected in task graph

Fields

§task_id: TaskId
§message: String
§

RunnerNotExecutable

Runner cannot execute this task type

Fields

§task_id: TaskId
§message: String
§

TaskClassNotFound

Task class/type not found during deserialization

Fields

§task_id: TaskId
§

InvocationNotFound

Invocation not found

Fields

§invocation_id: InvocationId
§

InvalidStatusTransition

Invalid status transition attempted

Fields

§invocation_id: InvocationId
§from_status: InvocationStatus
§allowed_statuses: Vec<InvocationStatus>
§

OwnershipViolation

Runner ownership violation during status transition

Fields

§invocation_id: InvocationId
§from_status: InvocationStatus
§current_owner: String
§attempted_owner: String
§reason: String
§

StatusRaceCondition

Status changed between read and write (optimistic locking failure)

Fields

§invocation_id: InvocationId
§previous_status: InvocationStatus
§expected_status: InvocationStatus
§actual_status: InvocationStatus
§

TaskExecution

Task function raised an error during execution. Carries the original exception type name for retry matching.

Fields

§error_type: String
§message: String
§traceback: Option<String>
§

Infrastructure

Unified infrastructure error with structured classification.

Fields

§message: String
§source: Option<Box<dyn Error + Send + Sync>>
§

Configuration

Configuration error

Fields

§message: String
§

Internal

Generic internal error

Fields

§message: String
§

NotSupported

Backend does not support this operation.

Fields

§backend: String
§method: String

Implementations§

Source§

impl RustvelloError

Source

pub fn state_backend(message: impl Into<String>) -> Self

State backend query/storage error (not retriable).

Source

pub fn broker_err(message: impl Into<String>) -> Self

Broker messaging error (not retriable).

Source

pub fn runner_err(message: impl Into<String>) -> Self

Runner infrastructure error.

Source

pub fn connection_err(message: impl Into<String>) -> Self

Connection failure (retriable).

Trait Implementations§

Source§

impl Debug for RustvelloError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for RustvelloError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for RustvelloError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more