Skip to main content

Fact

Enum Fact 

Source
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

§node: NodeId

Which one.

§began: Duration

How 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.

§took: Duration

How long its forward took. Whatever it did in there is inside that number: the engine does not look inside a node.

§device: Option<Device>

Where it was told to run, if it was told.

§

Failed

A node was advanced and did not answer. Emitted before the run stops, so a watcher learns which node while it is happening.

Fields

§node: NodeId

Which one.

§why: String

What it said.

§

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.

Fields

§node: NodeId

Which one.

§

Recalled

A node was not advanced at all: what it would have produced was already kept under that name.

Fields

§node: NodeId

Which one.

§key: Key

The name it was found under.

§

Kept

A node ran and what it produced was written down.

Fields

§node: NodeId

Which one.

§key: Key

The name it was written under.

§

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

§node: NodeId

Which one.

§of: usize

How many items it was given.

§recalled: usize

How many of them did not have to be computed.

§

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

§host: Host

Whose machine.

§began: Duration

How long after this run started it left.

§took: Duration

How long the round trip took.

§

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.

Fields

§host: Host

Whose machine.

§saw: Box<Fact>

What it saw there.

§

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

§kind: String

What kind of thing it is, which is what it will be written down as.

§pairs: Vec<(String, String)>

And its fields, text to text, already in the written form.

§

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.

Fields

§took: Duration

How long all of it took.

§

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.

Fields

§why: String

What stopped it.

Implementations§

Source§

impl Fact

Source

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.

Source

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.

Trait Implementations§

Source§

impl Clone for Fact

Source§

fn clone(&self) -> Fact

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Fact

Source§

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

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

impl<'de> Deserialize<'de> for Fact

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 Fact

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · 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 Serialize for Fact

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 Eq for Fact

Source§

impl StructuralPartialEq for Fact

Auto Trait Implementations§

§

impl Freeze for Fact

§

impl RefUnwindSafe for Fact

§

impl Send for Fact

§

impl Sync for Fact

§

impl Unpin for Fact

§

impl UnsafeUnpin for Fact

§

impl UnwindSafe for Fact

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<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.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,