Skip to main content

StopConditionSpec

Struct StopConditionSpec 

Source
pub struct StopConditionSpec {
    pub when: String,
    pub each: Vec<ScopeLevel>,
    pub trigger: Option<String>,
    pub pulse: Option<PulseSpec>,
    pub effect: Option<String>,
    pub at: Option<ScopeLevel>,
}
Expand description

SRD-83 — one stop condition declared on a shell. A polydat condition:/when: predicate over runtime-state wires (op_count, error_rate, elapsed_ms, children_failed, …); a per:/each: detection distribution selector (which scope levels it is evaluated at); a pulse: firing axis; an action:/effect: (fail → Interrupted+Failed, stop → Interrupted+Succeeded); and an at: action target scope (default = the innermost level of per:). When the predicate trips it stops the at: scope with the effect. Detection scope (per:) and action scope (at:) are independent.

Fields§

§when: String

Polydat predicate over runtime-state wires, evaluating to bool. Canonical key condition:; when: accepted as an alias.

§each: Vec<ScopeLevel>

Scope levels this predicate is DETECTED/evaluated at (the declared fan-out; see ScopeLevel). Canonical key per:; each: accepted as an alias. Defaults to the declaring scope (self).

§trigger: Option<String>

Firing trigger (legacy string form). None → a sensible default per condition kind. Superseded by pulse:; retained for compatibility.

§pulse: Option<PulseSpec>

Firing pulse — WHEN the predicate is evaluated. None → default per condition kind (attempt/rate wires → continuous; children_* → phase_end).

§effect: Option<String>

Effect on fire: "fail" or "stop". Canonical key action:; effect: accepted as an alias. None → fail.

§at: Option<ScopeLevel>

The ACTION target scope — where the effect lands, independent of where it is detected (per:). None → the innermost (most specific) level of per:, i.e. act in place (historical behaviour). Set e.g. at: workload to route a phase-detected stop out to the enclosing workload shell.

Implementations§

Source§

impl StopConditionSpec

Source

pub const EFFECT_VOCABULARY: [&'static str; 3]

SRD-83 Part 5 — the closed action:/effect: verb vocabulary. stop = Interrupted+Succeeded (a clean early halt that keeps the partial result); fail = Interrupted+Failed; abort = fail plus cancelling in-flight ops.

Source

pub fn validate(&self) -> Result<(), String>

Validate the semantic surface serde cannot: the effect verb. The runtime’s verb→Outcome map resolves any unrecognized string to the shell default, so before this check a typo’d effect: sotp silently became fail — an authoring trap. Rejected at workload load instead (“never ignore silently”).

Trait Implementations§

Source§

impl Clone for StopConditionSpec

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 StopConditionSpec

Source§

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

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

impl<'de> Deserialize<'de> for StopConditionSpec

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 PartialEq for StopConditionSpec

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 StopConditionSpec

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 StopConditionSpec

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> 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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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.