Skip to main content

Part

Struct Part 

Source
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

Source

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.

Source

pub fn order(&self) -> &[String]

The steps of the program it last ran, in order.

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub fn failures(&self) -> &[(String, GeopError)]

The steps of its last run that failed, in order, with why.

Source

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

Source

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.

Source

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.

Source

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.

Source

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

Trait Implementations§

Source§

impl Clone for Part

Source§

fn clone(&self) -> Part

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Default for Part

Source§

fn default() -> Part

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl !Freeze for Part

§

impl !RefUnwindSafe for Part

§

impl !Send for Part

§

impl !Sync for Part

§

impl !UnwindSafe for Part

§

impl Unpin for Part

§

impl UnsafeUnpin for Part

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.