Skip to main content

Layout

Struct Layout 

Source
pub struct Layout {
    pub primary: PathBuf,
    pub scratch: PathBuf,
    pub wt_root: PathBuf,
}
Expand description

The directories of one repository’s vitrify state.

Fields§

§primary: PathBuf

The primary checkout.

§scratch: PathBuf

<primary>/.vitrify — transactions, logs, run.json.

§wt_root: PathBuf

Root of the unit worktrees and the integration checkouts.

Implementations§

Source§

impl Layout

Source

pub fn resolve( primary: &Path, home: Option<&Path>, worktree_dir: &str, ) -> Result<Layout, CoreError>

The layout for primary. worktree_dir is run.worktree_dir: empty puts the worktrees under the vitrify home (home), keyed by the repository; a relative path is taken from the repository root.

Source

pub fn at(primary: &Path, wt_root: &Path) -> Layout

An explicit layout (tests, and callers that already know the root).

Source

pub fn mainline(&self, slug: &str) -> PathBuf

The integration checkout of the SDD slug: a detached worktree of the mainline head, where its gates and §5 commands run.

Source

pub fn mainline_lock(&self, slug: &str) -> PathBuf

The lock on that checkout: runs of one SDD gate one at a time, across processes; runs of different SDDs gate side by side. (A slug never ends in .lock, so no checkout is ever named like a lock.)

Source

pub fn base_checkout(&self, slug: &str) -> PathBuf

The checkout where the lane of the SDD slug runs a gate’s failing rows again on the gate’s base, apart from its integration checkout.

Source

pub fn head_checkout(&self, slug: &str) -> PathBuf

This process’s detached checkout of the mainline head for the SDD slug, where the run reads spec state.

Source

pub fn job_logs(&self, job: &str) -> PathBuf

.vitrify/logs/<job>/: the job’s own records — its run.json, project.json, events.jsonl and final report.

Source

pub fn lane_logs(&self, job: &str, slug: &str) -> PathBuf

.vitrify/logs/<job>/<slug>/: one lane’s records — its worker logs and prompts, its gate board, its escalations.

Source

pub fn unit_worktree(&self, slug: &str, unit: &str, seq: i64) -> PathBuf

One claim’s worktree.

Source

pub fn in_tree(&self) -> Option<PathBuf>

The worktree root relative to the primary checkout, when it lies inside it.

Source

pub fn ensure_scratch(&self) -> Result<(), CoreError>

Create .vitrify/ with the ignore file that keeps it out of the repository. Nothing is built under it, so the * hides nothing a tool needs to see.

Source

pub fn ensure_worktree_root(&self, primary: &Git) -> Result<(), CoreError>

Create the worktree root. A root inside the working tree is added to .git/info/exclude, and refused when one of the repository’s own ignore files already covers it — the case in which ignore-aware tools check nothing there.

Trait Implementations§

Source§

impl Clone for Layout

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 Layout

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Forget for Layout

§

impl Freeze for Layout

§

impl Move for Layout

§

impl RefUnwindSafe for Layout

§

impl Send for Layout

§

impl Sync for Layout

§

impl Unpin for Layout

§

impl UnsafeUnpin for Layout

§

impl UnwindSafe for Layout

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.