Skip to main content

FileVcs

Type Alias FileVcs 

Source
pub type FileVcs = Repository<FileStore<VcsState>>;
Expand description

A repository provider that keeps its state in one JSON document, so several onevcs invocations see one another’s effects.

Its sessions name a worktree beside that document and create it, so a journey that writes a file into a session’s tree has somewhere to write it.

Aliased Type§

pub struct FileVcs { /* private fields */ }

Implementations§

Source§

impl FileVcs

Source

pub fn create(path: impl Into<PathBuf>) -> Result<Self>

A repository provider keeping its state at path: whatever is already there, or nothing.

Attaching rather than replacing, so a second provider over the same path picks up what the first one left — which is what a journey driving several invocations reaches for this flavour to get.

Source

pub fn seeded(path: impl Into<PathBuf>, state: VcsState) -> Result<Self>

A repository provider that starts from a scenario, keeping its state at path and replacing whatever was there.

Source

pub fn state(&self) -> Result<VcsState>

Everything it knows, read back out of its document.