Skip to main content

Snapshot

Struct Snapshot 

Source
pub struct Snapshot {
    pub checkout: PathBuf,
    pub head: String,
    pub sdds: Vec<SddAt>,
    pub graph: UnitGraph,
    pub resolved: Result<Resolution, Cycles>,
    pub ownership: Ownership,
    pub spec: SpecFiles,
}
Expand description

The repository at one commit, as the re-check cascade reads it.

Fields§

§checkout: PathBuf

The checkout the SDDs were loaded from.

§head: String

The commit, in full.

§sdds: Vec<SddAt>

Every SDD of the repository, sorted by slug, then root.

§graph: UnitGraph§resolved: Result<Resolution, Cycles>

The graph’s order and closures, or its cycles.

§ownership: Ownership§spec: SpecFiles

Implementations§

Source§

impl Snapshot

Source

pub fn load( git: &Git, checkout: &Path, head: &str, ) -> Result<Snapshot, CoreError>

Load every SDD of the repository from checkout, which holds the tree of the commit head names (a lane checkout reset to it, or the primary checkout at HEAD). An SDD that cannot be read is an error: without it the graph, and every closure through it, is incomplete.

Source

pub fn load_resolvable( git: &Git, checkout: &Path, head: &str, ) -> Result<(Snapshot, Option<Cycles>), CoreError>

Snapshot::load for a run that must go on whatever one SDD holds: an SDD that cannot be read is left out, and when the unit graph has a cycle the SDDs with a unit on one are left out of the graph — so the rest still get their closures, dirty sets and priorities — and the cycles are returned. Ownership and spec files still count every SDD read, so a change to a left-out SDD’s files is still its own.

Source

pub fn sdd(&self, slug: &str) -> Option<&SddAt>

The SDD with slug.

Source

pub fn candidates(&self) -> Vec<Candidate>

Every unit Verified at the head, with its anchor; sorted by node.

Source

pub fn dirty(&self, git: &Git, mode: Mode) -> Result<Cascade, CoreError>

Which Verified units, and which suites, must be checked again at the head. In Mode::Changes git is asked for one diff per distinct anchor; in Mode::Everything nothing is asked and everything is dirty.

Source

pub fn dirty_with( &self, git: &Git, mode: Mode, cache: &mut DiffCache, ) -> Result<Cascade, CoreError>

Snapshot::dirty, with what an earlier head’s diffs found kept in cache: a run reads every head, and most of what changed since an anchor had changed by the head before.

Trait Implementations§

Source§

impl Clone for Snapshot

Source§

fn clone(&self) -> Self

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 Debug for Snapshot

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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> Same for T

Source§

type Output = T

Should always be Self
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 = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

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.