pub struct Repository<T> { /* private fields */ }Expand description
The repository side of a run, over whichever store holds its state.
The two flavours below are this one behaviour with a different store under it, so neither can learn something the other does not know.
Implementations§
Source§impl Repository<MemoryStore<VcsState>>
impl Repository<MemoryStore<VcsState>>
Source§impl Repository<FileStore<VcsState>>
impl Repository<FileStore<VcsState>>
Sourcepub fn create(path: impl Into<PathBuf>) -> Result<Self>
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.
Trait Implementations§
Source§impl<T: Debug> Debug for Repository<T>
impl<T: Debug> Debug for Repository<T>
Source§impl<T: Store<VcsState>> Vcs for Repository<T>
impl<T: Store<VcsState>> Vcs for Repository<T>
Source§fn resolve_identity(&self, origin_or_path: &str) -> Result<Identity>
fn resolve_identity(&self, origin_or_path: &str) -> Result<Identity>
Resolve an origin URL or a checkout path to the repository identity it
belongs to.
Source§fn open_session(&self, req: SessionRequest) -> Result<Session>
fn open_session(&self, req: SessionRequest) -> Result<Session>
Open a session: a per-run clone of an execution checkout and an isolated
worktree cut from it, held under an occupancy lease.
Source§fn adopt_session(&self, token: SessionToken) -> Result<Session>
fn adopt_session(&self, token: SessionToken) -> Result<Session>
Re-attach to a session that already exists, claiming its free occupancy
lease.
Source§fn preserve(
&self,
s: &Session,
provenance: Provenance,
) -> Result<PreservedBranch>
fn preserve( &self, s: &Session, provenance: Provenance, ) -> Result<PreservedBranch>
Commit the session’s work onto a branch that outlives it, recording why.
Source§fn recoverable(&self, scope: Scope) -> Result<Vec<Recoverable>>
fn recoverable(&self, scope: Scope) -> Result<Vec<Recoverable>>
Every preserved-but-unpublished branch in scope, and what would land each.
Auto Trait Implementations§
impl<T> Freeze for Repository<T>where
T: Freeze,
impl<T> RefUnwindSafe for Repository<T>where
T: RefUnwindSafe,
impl<T> Send for Repository<T>where
T: Send,
impl<T> Sync for Repository<T>where
T: Sync,
impl<T> Unpin for Repository<T>where
T: Unpin,
impl<T> UnsafeUnpin for Repository<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Repository<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more