Skip to main content

Command

Enum Command 

Source
pub enum Command {
Show 20 variants ApplyChange { changes: Vec<EntityChange>, reason: String, }, RevertChange { operation: OperationId, changes: Vec<EntityChange>, reason: String, }, RatifyContract { work: WorkItemId, }, Reject { work: WorkItemId, reason: String, }, Claim { work: WorkItemId, }, Release { work: WorkItemId, reason: String, }, Handoff { work: WorkItemId, from: ActorId, to: ActorId, reason: String, }, Start { work: WorkItemId, occurred_at: Option<DateTime<Utc>>, }, Block { work: WorkItemId, reason: String, }, Unblock { work: WorkItemId, }, ReportProgress { work: WorkItemId, percent: u8, note: Option<String>, }, Submit { work: WorkItemId, note: Option<String>, occurred_at: Option<DateTime<Utc>>, }, Verify { work: WorkItemId, note: Option<String>, occurred_at: Option<DateTime<Utc>>, }, AttachArtifact { work: WorkItemId, artifact: Artifact, }, WaiveDependency { dependency: DependencyId, reason: String, }, RestoreDependency { dependency: DependencyId, reason: String, }, RevalidateBasis { work: WorkItemId, dependency: DependencyId, attempt: u32, reason: String, }, Decide { decision: DecisionId, outcome: String, }, LinkExternal(ExternalLinkRequest), UnlinkExternal { work: WorkItemId, reference: ExternalReferenceId, },
}
Expand description

A semantic state change; adapters must use the engine to apply it.

Variants§

§

ApplyChange

Apply a reviewed plan proposal without bypassing execution history; built from a full proposal by crate::plan_change.

Fields

§changes: Vec<EntityChange>

The canonical entity-level difference from the operation’s base revision, in the order crate::propose_change reports it; every before must match that state.

§reason: String

Human-readable purpose of the accepted scope change.

§

RevertChange

Undo a recorded plan change by applying its reviewed inverse, as a new operation that names the one it reverts; the history is never rewritten.

Fields

§operation: OperationId

The recorded plan change being undone.

§changes: Vec<EntityChange>

The inverse exactly as crate::propose_revert reports it for the current plan.

§reason: String

Human-readable purpose of the revert.

§

RatifyContract

Approve a proposed execution contract as a human or service.

Fields

§work: WorkItemId

Proposed task with a complete objective and acceptance criteria.

§

Reject

Return submitted work to its owner with an independent review.

Fields

§work: WorkItemId

Submitted task to return for rework.

§reason: String

Non-empty explanation of unmet acceptance.

§

Claim

Reserve a ready task for the calling actor; a claim is not a start.

Fields

§work: WorkItemId

Task to reserve.

§

Release

Give up the caller’s own unstarted claim, returning the task to Planned without an owner.

Fields

§work: WorkItemId

Claimed task owned by the caller.

§reason: String

Non-empty explanation, such as a mistaken claim or an executor that cannot continue.

§

Handoff

Transfer claimed, started or blocked work to another owner, authorized by a human or service; every recorded execution fact stays with the work.

Fields

§work: WorkItemId

Task changing owners.

§from: ActorId

Owner the caller observed; the command is refused if the work has changed hands.

§to: ActorId

New owner, who continues from the recorded state.

§reason: String

Non-empty explanation of the change of executor.

§

Start

Begin executing a claimed task, recording its start event.

Fields

§work: WorkItemId

Claimed task owned by the caller.

§occurred_at: Option<DateTime<Utc>>

When execution actually began, if before the commit; absent means the commit time.

§

Block

Suspend a task while preserving any existing owner.

Fields

§work: WorkItemId

Task to suspend.

§reason: String

Concrete blocker.

§

Unblock

Resume blocked work, preserving its owner.

Fields

§work: WorkItemId

Task to resume.

§

ReportProgress

Report task execution progress without accepting its result.

Fields

§work: WorkItemId

Owned task receiving the report.

§percent: u8

Execution percentage from 0 through 100.

§note: Option<String>

Optional explanation or correction context.

§

Submit

Request independent verification of owned work.

Fields

§work: WorkItemId

Task whose result is submitted.

§note: Option<String>

Optional evidence summary.

§occurred_at: Option<DateTime<Utc>>

When the result was actually submitted, if before the commit; absent means the commit time.

§

Verify

Accept a submitted result as a different actor.

Fields

§work: WorkItemId

Submitted task to verify.

§note: Option<String>

Optional verification evidence.

§occurred_at: Option<DateTime<Utc>>

When the result was actually verified, if before the commit; absent means the commit time.

§

AttachArtifact

Attach new evidence without replacing an existing artifact.

Fields

§work: WorkItemId

Work receiving evidence.

§artifact: Artifact

New artifact attributed to the caller.

§

WaiveDependency

Stop enforcing a soft constraint as a human or service, recording who, when and why.

Fields

§dependency: DependencyId

Soft constraint to set aside.

§reason: String

Non-empty justification.

§

RestoreDependency

Enforce a waived soft constraint again; the operation records who, when and why.

Fields

§dependency: DependencyId

Waived constraint to enforce again.

§reason: String

Non-empty justification.

§

RevalidateBasis

Record, as an independent human or service, that started work built on a rejected predecessor attempt remains valid on the predecessor’s current attempt.

Fields

§work: WorkItemId

Successor whose basis on the edge was invalidated.

§dependency: DependencyId

Provisional edge carrying the invalidated basis.

§attempt: u32

Predecessor attempt the reviewer checked; it must still be current and not rejected.

§reason: String

Non-empty justification of the review.

§

Decide

Resolve an open gate.

Fields

§decision: DecisionId

Gate to resolve.

§outcome: String

Non-empty outcome.

§

LinkExternal(ExternalLinkRequest)

Link work to an external tracker object without granting it local authority.

§

UnlinkExternal

Remove one work item’s link to an external object; the last link removes the record.

Fields

§work: WorkItemId

Work whose link is removed.

§reference: ExternalReferenceId

Linked external reference.

Trait Implementations§

Source§

impl Clone for Command

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 Command

Source§

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

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

impl<'de> Deserialize<'de> for Command

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 Serialize for Command

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

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

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