Skip to main content

ExplorationViolationKind

Enum ExplorationViolationKind 

Source
#[non_exhaustive]
pub enum ExplorationViolationKind {
Show 16 variants Projection(InvariantViolation), UnstableObligationIds { first: Vec<String>, second: Vec<String>, }, NonDeterministicProjection { first: Value, second: Value, }, ProjectionVariesWithRevision { left: u64, right: u64, detail: String, }, RejectedCommandMutatedState { command: Value, command_type: String, }, AppliedCommandMutatedInputState { command: Value, command_type: String, }, RejectedCommandApplied { command: Value, command_type: String, rejection: DomainRejection, }, CatalogedOperationDoesNotCompile { operation: OperationKey, }, BlockingInteractionNotBuildable { rejection: DomainRejection, }, BlockingInteractionNotAnswerable { error: InteractionSpecError, }, DeadEnd, CaseEndsByDisappearing { phase: Value, outcome: Option<Value>, }, TransitionRemovesCase { command: Value, command_type: String, }, UnreachableOutcome { outcome: Value, }, UnserializableState, UnserializableCommand,
}
Expand description

One rule an explored state or transition broke.

The §8.4 rules about phase ownership, terminal outcomes and duplicate obligation identifiers are reported as Self::Projection: they come from turnframe_core::flow::check_view, which is the same check the runtime runs in production. The other variants are exploration-only rules that need two projections or a transition to observe.

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

Projection(InvariantViolation)

A projection invariant of spec §8.4 was broken.

§

UnstableObligationIds

Two projections of the same state produced different obligation identifiers, so an obligation cannot be addressed twice in a row.

Fields

§first: Vec<String>

Identifiers of the first projection.

§second: Vec<String>

Identifiers of the second projection.

§

NonDeterministicProjection

Two projections of the same state differed. Projection must be pure (I2).

Fields

§first: Value

The first erased view.

§second: Value

The second erased view.

§

ProjectionVariesWithRevision

The same state projected differently at two case revisions.

A view is a function of the state: the revision on the case reference says which state was read, and travels into the cards built from the view, but it may not change the phase, the obligations, the blocking requirement, the notices or the outcome. A projector that reads it — to hide an obligation on a fresh case, say, or to phrase a notice differently after an edit — makes the map depend on how often the case was written, which no caller can reason about.

Fields

§left: u64

The first revision projected at.

§right: u64

The second revision projected at.

§detail: String

Which part of the view differs, as a stable label.

§

RejectedCommandMutatedState

A refused command changed the state it was given.

Fields

§command: Value

Serialized command.

§command_type: String

Stable label of the command, for logs.

§

AppliedCommandMutatedInputState

An applied command changed the state it was given instead of returning a new one.

Fields

§command: Value

Serialized command.

§command_type: String

Stable label of the command, for logs.

§

RejectedCommandApplied

validate_command refused a command the model then applied. Validation and execution disagree, so the executor would commit something the runtime believes it blocked.

Fields

§command: Value

Serialized command.

§command_type: String

Stable label of the command, for logs.

§rejection: DomainRejection

What validation said.

§

CatalogedOperationDoesNotCompile

A state’s catalogue offers an operation its own compile_act does not recognise.

The declaration is in one function and the translation in another, and nothing else relates them — so an operation added to the catalogue and forgotten in the compiler fails as far downstream as a mistake can. The catalogue offers it, the interpreter proposes it correctly with the right arguments, and the user is told his request could not be carried out, on a sentence that was understood perfectly.

Only a workflow returning turnframe_core::error::UNKNOWN_OPERATION is reported. A refusal for any other reason is a domain refusal and is left alone: an act whose arguments the explorer could not invent is refused honestly, and a check that demanded good arguments would be testing the wrong thing.

Fields

§operation: OperationKey

The operation the catalogue offered.

§

BlockingInteractionNotBuildable

The blocking requirement of the phase could not be turned into a card.

Fields

§rejection: DomainRejection

Why the workflow refused to build it.

§

BlockingInteractionNotAnswerable

The card built from the blocking requirement cannot be answered, so the phase would block its case forever (I6).

Fields

§error: InteractionSpecError

What is wrong with the card.

§

DeadEnd

A non-terminal state offers no candidate command and no blocking interaction: the conversation cannot move on from here.

§

CaseEndsByDisappearing

The projector gave an absent state a terminal phase or an outcome, so it describes a case that ends by disappearing.

A case’s identity outlives its content: removal is a status, never an absence, and an absent state therefore means not yet and never no longer. A projector that reads absence as completion is indistinguishable from one that reads it as a case nobody has started, because the executor returns the same None for both — so the same view has to serve a finished case and a fresh one, and the assistant congratulates the user and then asks them to start over. Give the terminal step a status in the state instead, the way the traveler sample’s Deleted does.

Fields

§phase: Value

The phase the absent state projected to.

§outcome: Option<Value>

The outcome it carried, when it carried one.

§

TransitionRemovesCase

A simulated transition dropped the case: it was given a state and returned none.

The other half of Self::CaseEndsByDisappearing, seen from the model rather than from the projector. A domain whose working document is consumed on success — a draft that becomes a record, an application that becomes an account — keeps the case and moves it to a terminal status; the record it produced is a different case, in its own workflow.

Fields

§command: Value

Serialized command.

§command_type: String

Stable label of the command, for logs.

§

UnreachableOutcome

An outcome the model declares reachable was never projected. Only reported when the search ran to completion: see ExplorationReport::truncated.

Fields

§outcome: Value

The outcome that was never projected.

§

UnserializableState

A state could not be serialized, so it cannot be deduplicated or shown.

§

UnserializableCommand

A command could not be serialized, so it cannot be shown in a path.

Trait Implementations§

Source§

impl Clone for ExplorationViolationKind

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for ExplorationViolationKind

Source§

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

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

impl<'de> Deserialize<'de> for ExplorationViolationKind

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for ExplorationViolationKind

Source§

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

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

impl Eq for ExplorationViolationKind

Source§

impl Error for ExplorationViolationKind

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 ExplorationViolationKind

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl Serialize for ExplorationViolationKind

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for ExplorationViolationKind

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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

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

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

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