pub struct WorkloopSpec { /* private fields */ }Expand description
The declared shape of one workloop, as the engine takes it: arming, invariants, and the retention window — all REQUIRED parameters, refused when absent or degenerate (the estate rule: no assumed defaults).
Implementations§
Source§impl WorkloopSpec
impl WorkloopSpec
Sourcepub fn new(
arming: WorkloopArming,
invariants: Vec<InvariantSpec>,
retention: Duration,
) -> Result<Self, WorkloopSpecError>
pub fn new( arming: WorkloopArming, invariants: Vec<InvariantSpec>, retention: Duration, ) -> Result<Self, WorkloopSpecError>
Builds a validated workloop spec.
§Errors
Refuses: no invariants; duplicate/empty invariant names; a missing record type or confirming route; a zero retention window; and — the R2.4a cross-rule — any invariant on a signal-only loop whose tolerance lacks the duration form.
Sourcepub fn with_carry(
arming: WorkloopArming,
invariants: Vec<InvariantSpec>,
retention: Duration,
carry: CarryContract,
) -> Result<Self, WorkloopSpecError>
pub fn with_carry( arming: WorkloopArming, invariants: Vec<InvariantSpec>, retention: Duration, carry: CarryContract, ) -> Result<Self, WorkloopSpecError>
WorkloopSpec::new for a loop that DECLARES carry fields, with the
defaults that seed generation 1.
§Errors
As WorkloopSpec::new, plus the carry contract’s own refusals.
Sourcepub const fn arming(&self) -> &WorkloopArming
pub const fn arming(&self) -> &WorkloopArming
The loop’s declared arming.
Sourcepub fn invariants(&self) -> &[InvariantSpec]
pub fn invariants(&self) -> &[InvariantSpec]
The loop’s declared invariants.
Sourcepub const fn carry(&self) -> &CarryContract
pub const fn carry(&self) -> &CarryContract
The loop’s declared carry contract.
Trait Implementations§
Source§impl Clone for WorkloopSpec
impl Clone for WorkloopSpec
Source§fn clone(&self) -> WorkloopSpec
fn clone(&self) -> WorkloopSpec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WorkloopSpec
impl Debug for WorkloopSpec
Source§impl<'de> Deserialize<'de> for WorkloopSpec
impl<'de> Deserialize<'de> for WorkloopSpec
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for WorkloopSpec
Source§impl PartialEq for WorkloopSpec
impl PartialEq for WorkloopSpec
Source§impl Serialize for WorkloopSpec
impl Serialize for WorkloopSpec
impl StructuralPartialEq for WorkloopSpec
Auto Trait Implementations§
impl Freeze for WorkloopSpec
impl RefUnwindSafe for WorkloopSpec
impl Send for WorkloopSpec
impl Sync for WorkloopSpec
impl Unpin for WorkloopSpec
impl UnsafeUnpin for WorkloopSpec
impl UnwindSafe for WorkloopSpec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more