pub struct Part { /* private fields */ }Expand description
What a program builds: a node per step and target it produced, the
order of the steps it last ran, and the inputs and state it ran with.
Read only through a Reader: Part::current, Part::before,
Part::after.
Implementations§
Source§impl Part
impl Part
Sourcepub fn given(inputs: Settings, state: StateValues) -> Self
pub fn given(inputs: Settings, state: StateValues) -> Self
An empty part, to be run with inputs and state: what a test
running steps by hand (Runner::run_step) starts from. A run of a
program gives its own.
Sourcepub fn current(&self) -> Reader<'_>
pub fn current(&self) -> Reader<'_>
The part as it is now: during a run, with what the steps so far produced; after one, the finished part.
Sourcepub fn before(&self, step: &str) -> Reader<'_>
pub fn before(&self, step: &str) -> Reader<'_>
The part as it is before the step step of the last run: what that
step is edited against. The finished part for a step that did not
run.
Sourcepub fn after(&self, step: &str) -> Reader<'_>
pub fn after(&self, step: &str) -> Reader<'_>
The part as it is after the step step of the last run, with what it
produced. The finished part for a step that did not run.
Sourcepub fn revision(&self) -> u64
pub fn revision(&self) -> u64
Changes exactly when a run changes any of its nodes: what tells a view of it to draw again. Equal for two parts only where one is a copy of the other since.
Sourcepub fn failures(&self) -> &[(String, GeopError)]
pub fn failures(&self) -> &[(String, GeopError)]
The steps of its last run that failed, in order, with why.
Sourcepub fn suppressed(&self) -> &[String]
pub fn suppressed(&self) -> &[String]
The steps of the last run that are suppressed — that ran, and found
they were not to — in order (see
crate::program::ProgramStep::active).
Sourcepub fn placed(&self) -> Vec<(&str, &str, &PlacedPart)>
pub fn placed(&self) -> Vec<(&str, &str, &PlacedPart)>
The parts placed in the finished part — not in those — in the order the steps placed them: each by its instance name, with the step that placed it and its build.
Sourcepub fn placed_at_path(&self, path: &str) -> Option<&PlacedPart>
pub fn placed_at_path(&self, path: &str) -> Option<&PlacedPart>
The part placed at path — bolt, or asm/bolt for one placed in
a placed part, however deep — as the last run built it: none, for no
part placed so.
Sourcepub fn placing(&self, path: &str) -> Option<Reader<'_>>
pub fn placing(&self, path: &str) -> Option<Reader<'_>>
The part as the step that placed the part at path — bolt, or
asm/bolt — in the last run left it: what a step of the part placed,
edited where it is placed, reads in context (see
Reader::placed_in) — the parts placed before it, and where it is
itself — placed in turn where the part placing it is, so that it
reads through every level, ../../bracket. None, for no part placed
so.
Sourcepub fn differences(&self, other: &Part) -> Vec<String>
pub fn differences(&self, other: &Part) -> Vec<String>
Where the part, as it is now, differs from other: the name of
every target whose current node holds a value — or a failure —
other than the other part’s, by the PartialEq of its type, or that
only one of them has; and so in the part placed by every placed
node, behind its name. What tells a part a run reused nodes in from
one built from scratch (see testing::assert_incremental).