pub enum Fact {
Ran {
node: NodeId,
began: Duration,
took: Duration,
device: Option<Device>,
},
Failed {
node: NodeId,
why: String,
},
Spared {
node: NodeId,
},
Recalled {
node: NodeId,
key: Key,
},
Kept {
node: NodeId,
key: Key,
},
Items {
node: NodeId,
of: usize,
recalled: usize,
},
Left {
host: Host,
began: Duration,
took: Duration,
},
Elsewhere {
host: Host,
saw: Box<Fact>,
},
Said {
kind: String,
pairs: Vec<(String, String)>,
},
Finished {
took: Duration,
},
Broke {
why: String,
},
}Expand description
One thing the engine saw.
Variants§
Ran
A node was advanced, and answered.
Fields
began: DurationHow long after this run started it began. An offset into a slice
is a fact about the slice, so one that ran elsewhere counts from its
own start and a timeline adds the Fact::Left it arrived under.
Failed
A node was advanced and did not answer. Emitted before the run stops, so a watcher learns which node while it is happening.
Spared
A node was not run because nobody needed what it makes.
A fact and not an absence: a node missing from a record cannot be told from one that was never in the graph.
Recalled
A node was not advanced at all: what it would have produced was already kept under that name.
Kept
A node ran and what it produced was written down.
Items
A node that maps over its items, item by item — it runs the new ones and reads the rest back, so one number would not say what happened.
Fields
Left
A slice of the plan crossed to another machine, and came back. took
is the whole round trip, which is not the sum of what happened there.
Fields
Elsewhere
And this is what happened over there. Recursive, so a slice that
carried on to a third host still says where each thing happened and
nothing that travelled is rewritten; flattening turns it into a host.
Said
A level that is not the engine had something to say, already flat.
The carrier and not the vocabulary: the core does not learn what a load average is, only that other levels exist and one may be speaking from another machine. Not for level 2, whose loss is computed where the notebook is and goes straight into the record.
Fields
Finished
The whole thing is over. Emitted by Executor::run
and not by resume: a slice is not a
forward. It is what tells a writer where one record ends.
Broke
…or it is over because of this: the other terminal fact, so a record
is closed either way. A node that failed said so as Fact::Failed.
Implementations§
Source§impl Fact
impl Fact
Sourcepub fn flattened(&self) -> (&str, Vec<(String, String)>)
pub fn flattened(&self) -> (&str, Vec<(String, String)>)
This fact as a name and text-to-text fields: how it is written down, which is not how it is emitted.
Fact::Elsewhere does not survive as a name — it becomes a host
field on whatever it wrapped, so a reader gets columns and not a tree.
Sourcepub fn ends_a_run(&self) -> bool
pub fn ends_a_run(&self) -> bool
Whether this fact ends a run, whichever way. Asked by whoever writes records so it does not have to know the vocabulary.