Skip to main content

EngineError

Enum EngineError 

Source
pub enum EngineError {
Show 29 variants RevisionConflict { expected: u64, actual: u64, }, StaleChange { collection: String, id: Option<String>, }, Json(Error), ActorNotAllowed { actor: ActorId, action: &'static str, }, Validation(ValidationError), InvalidCommand { entity: String, reason: String, }, MissingWorkItem(WorkItemId), MissingDependency(DependencyId), MissingDecision(DecisionId), NotATask { work: WorkItemId, kind: WorkKind, }, NotReady { work: WorkItemId, transition: Transition, unmet: Vec<UnmetGate>, }, OccurrenceInFuture { work: WorkItemId, key: Key, transition: Transition, occurred_at: DateTime<Utc>, committed_at: DateTime<Utc>, }, OccurrenceBeforePrevious { work: WorkItemId, key: Key, transition: Transition, occurred_at: DateTime<Utc>, previous_at: DateTime<Utc>, }, NotStarted(WorkItemId), AlreadyStarted(WorkItemId), OwnerMismatch { work: WorkItemId, expected: ActorId, actual: ActorId, }, Blocked { work: WorkItemId, reason: String, }, OwnedByAnother { work: WorkItemId, owner: ActorId, }, InvalidTransition { work: WorkItemId, status: WorkStatus, }, NotSubmitted(WorkItemId), SelfVerification(WorkItemId), OwnGateRelaxed { actor: ActorId, work: Key, relaxed: Box<RelaxedConstraint>, }, StaleAttempt { work: WorkItemId, dependency: DependencyId, requested: u32, current: Option<u32>, }, DecisionNotOpen(DecisionId), MissingExternalReference(ExternalReferenceId), MissingExternalLink { work: WorkItemId, reference: ExternalReferenceId, }, DuplicateExternalLink { work: WorkItemId, reference: ExternalReferenceId, }, TrackingOwned { identity: String, owner: Key, }, Schedule(ScheduleError),
}
Expand description

A rejected command or failed execution projection.

Variants§

§

RevisionConflict

A plan proposal no longer refers to the current revision.

Fields

§expected: u64

Revision the caller observed.

§actual: u64

Current revision.

§

StaleChange

A recorded plan change names an entity whose state differs from the change’s before.

Fields

§collection: String

Collection of the entity.

§id: Option<String>

Entity identity, absent for workspace-wide values.

§

Json(Error)

A semantic difference could not be serialized.

§

ActorNotAllowed

Local principal policy refuses this action.

Fields

§actor: ActorId

Principal requesting the operation.

§action: &'static str

Refused action.

§

Validation(ValidationError)

Invalid authoritative input.

§

InvalidCommand

Invalid command field or target category.

Fields

§entity: String

Identifier of the affected value.

§reason: String

Failed invariant.

§

MissingWorkItem(WorkItemId)

Referenced work does not exist.

§

MissingDependency(DependencyId)

Referenced temporal constraint does not exist.

§

MissingDecision(DecisionId)

Referenced gate does not exist.

§

NotATask

Execution commands target a grouping or condition rather than executable work.

Fields

§work: WorkItemId

Targeted work item.

§kind: WorkKind

Non-executable kind of the target.

§

NotReady

Lifecycle or relation gates do not permit this transition at the operation time.

Fields

§work: WorkItemId

Affected work.

§transition: Transition

Transition that was refused.

§unmet: Vec<UnmetGate>

The same structured conditions the gate report returns for this transition.

§

OccurrenceInFuture

A supplied occurrence time lies after the time the operation commits.

Fields

§work: WorkItemId

Affected work.

§key: Key

Human key of the affected work.

§transition: Transition

Transition whose event time was supplied.

§occurred_at: DateTime<Utc>

Supplied occurrence time.

§committed_at: DateTime<Utc>

Commit time of the operation.

§

OccurrenceBeforePrevious

A supplied occurrence time precedes the latest time already recorded for the task.

Fields

§work: WorkItemId

Affected work.

§key: Key

Human key of the affected work.

§transition: Transition

Transition whose event time was supplied.

§occurred_at: DateTime<Utc>

Supplied occurrence time.

§previous_at: DateTime<Utc>

Latest time already recorded in the task’s execution history.

§

NotStarted(WorkItemId)

Progress and submission follow an explicit start; a claim only reserves work.

§

AlreadyStarted(WorkItemId)

Started work has execution facts a release would orphan; only a handoff moves it.

§

OwnerMismatch

A handoff named an owner the work no longer has.

Fields

§work: WorkItemId

Affected work.

§expected: ActorId

Owner named by the request.

§actual: ActorId

Current owner.

§

Blocked

A reported blocker prevents execution.

Fields

§work: WorkItemId

Affected work.

§reason: String

Recorded blocker.

§

OwnedByAnother

Another principal owns the task.

Fields

§work: WorkItemId

Affected work.

§owner: ActorId

Principal allowed to submit the result.

§

InvalidTransition

The lifecycle does not permit the requested transition.

Fields

§work: WorkItemId

Affected work.

§status: WorkStatus

Current lifecycle.

§

NotSubmitted(WorkItemId)

Verification requires a submitted result.

§

SelfVerification(WorkItemId)

Verification must be independent of the owner.

§

OwnGateRelaxed

A reviewed change would relax a gate on the applying actor’s own work or on the work waiting for its result.

Fields

§actor: ActorId

Principal applying the change.

§work: Key

The actor’s own work the constraint concerns.

§relaxed: Box<RelaxedConstraint>

The constraint the change would relax.

§

StaleAttempt

A revalidation names a predecessor attempt that is not its current pending or verified one.

Fields

§work: WorkItemId

Successor named by the request.

§dependency: DependencyId

Provisional edge named by the request.

§requested: u32

Attempt the reviewer checked.

§current: Option<u32>

Predecessor’s latest attempt if it is pending or verified.

§

DecisionNotOpen(DecisionId)

A resolved gate cannot be resolved again.

§

MissingExternalReference(ExternalReferenceId)

Referenced external object is not recorded in this workspace.

The work item has no link to the external reference.

Fields

§work: WorkItemId

Work named by the request.

§reference: ExternalReferenceId

External reference named by the request.

The work item already links the external reference.

Fields

§work: WorkItemId

Work named by the request.

§reference: ExternalReferenceId

External reference already linked.

§

TrackingOwned

Another work item already tracks the external object.

Fields

§identity: String

External identity whose tracking is owned.

§owner: Key

Key of the work that tracks it.

§

Schedule(ScheduleError)

Schedule projection failed.

Trait Implementations§

Source§

impl Debug for EngineError

Source§

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

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

impl Display for EngineError

Source§

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

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

impl Error for EngineError

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
Source§

impl From<Error> for EngineError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<ScheduleError> for EngineError

Source§

fn from(source: ScheduleError) -> Self

Converts to this type from the input type.
Source§

impl From<ValidationError> for EngineError

Source§

fn from(source: ValidationError) -> Self

Converts to this type from the input type.

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, 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 = !

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

fn try_from(value: U) -> Result<T, !>

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.