pub struct TrackerLane { /* private fields */ }Expand description
A tracker’s content lane in the store: content-addressed snapshots under
.newgit/snapshots/<tracker>/<rev>/, plus a LATEST pointer that marks the
lane head/default for new instances and explicit pulls.
Checkpoints reference lane revs by name, so pruning (a future cleanup
concern) must never delete a rev any checkpoint record still points at.
Implementations§
Source§impl TrackerLane
impl TrackerLane
pub fn new(snapshots_root: &Utf8Path, tracker: &str) -> Self
pub fn latest(&self) -> Option<String>
pub fn set_latest(&self, rev: &str) -> Result<()>
pub fn has_rev(&self, rev: &str) -> bool
Sourcepub fn capture(
&self,
workspace: &Utf8Path,
definition: &TrackerDefinition,
) -> Result<CaptureOutcome>
pub fn capture( &self, workspace: &Utf8Path, definition: &TrackerDefinition, ) -> Result<CaptureOutcome>
Snapshot the tracker’s owned paths from workspace. Identical
content dedupes to an existing rev.
Sourcepub fn deposit(&self, dir: &Utf8Path) -> Result<CaptureOutcome>
pub fn deposit(&self, dir: &Utf8Path) -> Result<CaptureOutcome>
Snapshot an arbitrary directory’s contents into the lane — how a resource checkpoint deposits into a deposit-only tracker (one with no owned workspace paths).
Sourcepub fn rev_path(&self, rev: &str) -> Utf8PathBuf
pub fn rev_path(&self, rev: &str) -> Utf8PathBuf
Absolute path of a captured rev’s content directory.
Trait Implementations§
Source§impl Clone for TrackerLane
impl Clone for TrackerLane
Source§fn clone(&self) -> TrackerLane
fn clone(&self) -> TrackerLane
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TrackerLane
impl RefUnwindSafe for TrackerLane
impl Send for TrackerLane
impl Sync for TrackerLane
impl Unpin for TrackerLane
impl UnsafeUnpin for TrackerLane
impl UnwindSafe for TrackerLane
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