pub enum Element {
Scalar(Value),
Count(i64),
Member(Value),
Sum(i64),
Progress(i64),
}Expand description
A threshold element (CON-3801 element): a named element of a carrier
that a threshold read observes being reached.
Variants§
Scalar(Value)
A bare scalar; only #t against bool is admitted.
Count(i64)
(count n): at least n addresses, against addrs.
Member(Value)
(member x): x present, against vals or entries.
Sum(i64)
(sum n): grow-only numeric events sum to at least n. Installation
requires a mandatory nonnegative shape on their writer.
Progress(i64)
(progress n): the progress closure has reached position n.
Implementations§
Source§impl Element
impl Element
Sourcepub fn render(&self) -> Value
pub fn render(&self) -> Value
The element as a state value that round-trips the wire form:
{"count":2}, {"member":"x"}, {"sum":10}, {"progress":3},
"fault", true.
Sourcepub fn admitted_by(&self, carrier: &Carrier) -> bool
pub fn admitted_by(&self, carrier: &Carrier) -> bool
Whether the carrier admits this element (the typing table of
CON-3801): count n against addrs; member x against vals or
entries; sum n against nonnegative numeric entries (the writer
shape is checked at installation); progress n against progress;
a bare #t against bool. Faults are separate outcomes.
pub fn finite_read( &self, table: &Table, index: usize, projection: &Option<Projection>, ) -> bool
pub fn le_with_post(&self, l: &L, post: &Post) -> bool
Sourcepub fn le_display(&self, shown: &Value) -> bool
pub fn le_display(&self, shown: &Value) -> bool
The element is reached by a closure head’s display (REQ-3808): the
progress integer has reached n. Faults are checked separately.
The closure heads have no summarising carrier, so their ⊤ and their
position are read from the display, which is monotone as proved in
SPEC-034 and SPEC-019 CON-1908.