Skip to main content

MutationValidationError

Enum MutationValidationError 

Source
pub enum MutationValidationError {
Show 33 variants SequenceOverflow, NonMonotonicSequence { expected: u64, provided: u64, }, UnknownRun { run_id: RunId, }, UnknownTask { task_id: TaskId, }, TaskAlreadyExists { task_id: TaskId, }, TaskAlreadyCanceled { task_id: TaskId, }, EngineAlreadyPaused, EngineNotPaused, RunAlreadyExists { run_id: RunId, }, RunCreateRequiresScheduled { run_id: RunId, state: RunState, }, PreviousStateMismatch { run_id: RunId, expected: RunState, actual: RunState, }, InvalidTransition { run_id: RunId, from: RunState, to: RunState, }, AttemptStartUnknownRun { run_id: RunId, }, AttemptStartRequiresRunning { run_id: RunId, state: RunState, }, AttemptStartAlreadyActive { run_id: RunId, active_attempt_id: AttemptId, }, AttemptFinishUnknownRun { run_id: RunId, }, AttemptFinishRequiresRunning { run_id: RunId, state: RunState, }, AttemptFinishMissingActive { run_id: RunId, }, AttemptFinishAttemptMismatch { run_id: RunId, expected_attempt_id: AttemptId, provided_attempt_id: AttemptId, }, LeaseUnknownRun { run_id: RunId, event: LeaseValidationEvent, }, LeaseInvalidRunState { run_id: RunId, event: LeaseValidationEvent, state: RunState, }, LeaseAlreadyActive { run_id: RunId, }, LeaseMissingActive { run_id: RunId, event: LeaseValidationEvent, }, LeaseOwnerMismatch { run_id: RunId, event: LeaseValidationEvent, }, LeaseExpiryMismatch { run_id: RunId, event: LeaseValidationEvent, expected_expiry: u64, provided_expiry: u64, }, LeaseHeartbeatExpiryRegression { run_id: RunId, previous_expiry: u64, proposed_expiry: u64, }, EmptyDependencyList { task_id: TaskId, }, RunSuspendRequiresRunning { run_id: RunId, state: RunState, }, RunResumeRequiresSuspended { run_id: RunId, state: RunState, }, BudgetNotAllocated { task_id: TaskId, dimension: BudgetDimension, }, SubscriptionAlreadyExists { subscription_id: SubscriptionId, }, UnknownSubscription { subscription_id: SubscriptionId, }, SubscriptionAlreadyCanceled { subscription_id: SubscriptionId, },
}
Expand description

Typed validation failures from the authority validation stage.

Variants§

§

SequenceOverflow

Projection sequence could not be advanced because it overflowed u64.

§

NonMonotonicSequence

Command sequence is stale or otherwise non-monotonic.

Fields

§expected: u64

The expected next sequence.

§provided: u64

The command-provided sequence.

§

UnknownRun

Run targeted by the command does not exist in projection state.

Fields

§run_id: RunId

Missing run identifier.

§

UnknownTask

Task targeted by the command does not exist in projection state.

Fields

§task_id: TaskId

Missing task identifier.

§

TaskAlreadyExists

Task creation rejected because task already exists.

Fields

§task_id: TaskId

Existing task identifier.

§

TaskAlreadyCanceled

Task cancellation rejected because task is already canceled.

Fields

§task_id: TaskId

Already canceled task identifier.

§

EngineAlreadyPaused

Engine pause command rejected because engine is already paused.

§

EngineNotPaused

Engine resume command rejected because engine is not paused.

§

RunAlreadyExists

Run creation rejected because run already exists.

Fields

§run_id: RunId

Existing run identifier.

§

RunCreateRequiresScheduled

Run creation requires Scheduled initial state.

Fields

§run_id: RunId

Target run identifier.

§state: RunState

Proposed initial state.

§

PreviousStateMismatch

Command expected previous state does not match observed projection state.

Fields

§run_id: RunId

Target run identifier.

§expected: RunState

Expected command previous state.

§actual: RunState

Observed projection state.

§

InvalidTransition

Command requested an invalid lifecycle transition.

Fields

§run_id: RunId

Target run identifier.

§from: RunState

Requested source state.

§to: RunState

Requested target state.

§

AttemptStartUnknownRun

Attempt-start command references a run that is unknown in projection state.

Fields

§run_id: RunId

Missing run identifier.

§

AttemptStartRequiresRunning

Attempt-start command requires the run to be in Running.

Fields

§run_id: RunId

Target run identifier.

§state: RunState

Observed projection state.

§

AttemptStartAlreadyActive

Attempt-start command rejected because the run already has an active attempt.

Fields

§run_id: RunId

Target run identifier.

§active_attempt_id: AttemptId

Already active attempt identifier.

§

AttemptFinishUnknownRun

Attempt-finish command references a run that is unknown in projection state.

Fields

§run_id: RunId

Missing run identifier.

§

AttemptFinishRequiresRunning

Attempt-finish command requires the run to be in Running.

Fields

§run_id: RunId

Target run identifier.

§state: RunState

Observed projection state.

§

AttemptFinishMissingActive

Attempt-finish command requires an active attempt to exist.

Fields

§run_id: RunId

Target run identifier.

§

AttemptFinishAttemptMismatch

Attempt-finish command attempt ID does not match active projection attempt ID.

Fields

§run_id: RunId

Target run identifier.

§expected_attempt_id: AttemptId

Currently active attempt identifier.

§provided_attempt_id: AttemptId

Attempt identifier provided by command.

§

LeaseUnknownRun

Lease lifecycle command references a run that is unknown in projection state.

Fields

§run_id: RunId

Missing run identifier.

§event: LeaseValidationEvent

Lease lifecycle command kind.

§

LeaseInvalidRunState

Lease lifecycle command is invalid for the run’s observed lifecycle state.

Fields

§run_id: RunId

Target run identifier.

§event: LeaseValidationEvent

Lease lifecycle command kind.

§state: RunState

Observed projection run state.

§

LeaseAlreadyActive

Lease-acquire command rejected because a lease is already active.

Fields

§run_id: RunId

Target run identifier.

§

LeaseMissingActive

Lease lifecycle command requires active lease metadata but none exists.

Fields

§run_id: RunId

Target run identifier.

§event: LeaseValidationEvent

Lease lifecycle command kind.

§

LeaseOwnerMismatch

Lease lifecycle command owner does not match active lease owner.

Fields

§run_id: RunId

Target run identifier.

§event: LeaseValidationEvent

Lease lifecycle command kind.

§

LeaseExpiryMismatch

Lease close command expiry does not match active lease expiry.

Fields

§run_id: RunId

Target run identifier.

§event: LeaseValidationEvent

Lease lifecycle command kind.

§expected_expiry: u64

Expected active lease expiry.

§provided_expiry: u64

Command-provided expiry.

§

LeaseHeartbeatExpiryRegression

Lease heartbeat command attempted to regress lease expiry.

Fields

§run_id: RunId

Target run identifier.

§previous_expiry: u64

Current active lease expiry.

§proposed_expiry: u64

Heartbeat-proposed expiry.

§

EmptyDependencyList

Dependency declaration command contains an empty depends_on list.

Fields

§task_id: TaskId

The task whose dependency list was empty.

§

RunSuspendRequiresRunning

Run suspend command rejected because the run is not in Running state.

Fields

§run_id: RunId

Target run identifier.

§state: RunState

Observed projection state.

§

RunResumeRequiresSuspended

Run resume command rejected because the run is not in Suspended state.

Fields

§run_id: RunId

Target run identifier.

§state: RunState

Observed projection state.

§

BudgetNotAllocated

Budget replenish command rejected because no allocation exists.

Fields

§task_id: TaskId

Task targeted by the command.

§dimension: BudgetDimension

Budget dimension that has no allocation.

§

SubscriptionAlreadyExists

Subscription create command rejected because the subscription already exists.

Fields

§subscription_id: SubscriptionId

Existing subscription identifier.

§

UnknownSubscription

Subscription lifecycle command references a subscription that is unknown.

Fields

§subscription_id: SubscriptionId

Missing subscription identifier.

§

SubscriptionAlreadyCanceled

Subscription cancel command rejected because the subscription is already canceled.

Fields

§subscription_id: SubscriptionId

Already canceled subscription identifier.

Trait Implementations§

Source§

impl Clone for MutationValidationError

Source§

fn clone(&self) -> MutationValidationError

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MutationValidationError

Source§

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

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

impl Display for MutationValidationError

Source§

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

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

impl Error for MutationValidationError

1.30.0 · 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 PartialEq for MutationValidationError

Source§

fn eq(&self, other: &MutationValidationError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for MutationValidationError

Source§

impl Eq for MutationValidationError

Source§

impl StructuralPartialEq for MutationValidationError

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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