Skip to main content

Signal

Enum Signal 

Source
pub enum Signal {
    EvaluateGates(GateAggregate),
    AllocateBudget,
    ExecutionSucceeded,
    ExecutionFailed,
    RetryDecide(RetryOutcome),
    Cancel,
    Timeout,
    BackoffElapsed,
    OperatorTransition(JobPhase),
}
Expand description

FSM driver — every legal way a Job’s phase can change. Exhaustive over the (JobPhase, Signal) cross-product per theory/SHIGOTO.md §IV.1; the advance table below enumerates every cell.

kind() + variant predicates auto-generated via gen-platform.

Variants§

§

EvaluateGates(GateAggregate)

Re-evaluate gates for a Pending or Gated or Retrying job. The outcome (Gated / Ready / Skipped) is carried in the signal payload so the FSM stays pure — gate evaluation itself is in shigoto-gate.

§

AllocateBudget

Scheduler chose to start this Ready job (budget allocated).

§

ExecutionSucceeded

execute() returned Ok(output).

§

ExecutionFailed

execute() returned Err.

§

RetryDecide(RetryOutcome)

Retry decision after Failed. Carries whether to retry (then Retrying with backoff) or deadletter.

§

Cancel

Cooperative cancellation signal — Running job was told to stop. Maps to Failed (with cancellation error).

§

Timeout

Per-job timeout elapsed while Running. Maps to Failed (with timeout error).

§

BackoffElapsed

Retry backoff window elapsed; ready to re-evaluate gates.

§

OperatorTransition(JobPhase)

Externally-driven transition from operator action. Constrained to (WaitingForOperator → Ready|Skipped) and (Deadlettered → Pending) per §VII.3.

Implementations§

Source§

impl Signal

Source

pub const fn kind(&self) -> &'static str

Stable variant discriminant — auto-generated by #[derive(Discriminant)]. The string IS the wire identifier for metrics labels / audit-log tags / rate-limit keys; renaming an existing variant is a breaking change.

Source§

impl Signal

Source

pub const fn is_evaluate_gates(&self) -> bool

Source

pub const fn is_allocate_budget(&self) -> bool

Source

pub const fn is_execution_succeeded(&self) -> bool

Source

pub const fn is_execution_failed(&self) -> bool

Source

pub const fn is_retry_decide(&self) -> bool

Source

pub const fn is_cancel(&self) -> bool

Source

pub const fn is_timeout(&self) -> bool

Source

pub const fn is_backoff_elapsed(&self) -> bool

Source

pub const fn is_operator_transition(&self) -> bool

Source§

impl Signal

Source

pub fn is_operator_driven(&self) -> bool

Whether this signal originated from an operator command. Operator-driven transitions get logged with extra metadata.

Trait Implementations§

Source§

impl Clone for Signal

Source§

fn clone(&self) -> Signal

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 Signal

Source§

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

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

impl Eq for Signal

Source§

impl PartialEq for Signal

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · 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 StructuralPartialEq for Signal

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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

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

Checks if this value is equivalent to the given key. Read more
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, 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, 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.