pub struct CacheRepo { /* private fields */ }Expand description
Shorthand for accessing things within a particular repo
Implementations§
Source§impl CacheRepo
impl CacheRepo
Sourcepub fn get(&self, filename: &str) -> Option<PathBuf>
pub fn get(&self, filename: &str) -> Option<PathBuf>
This will get the location of the file within the cache for the remote
filename. Will return None if file is not already present in cache.
Sourcepub fn create_ref(&self, commit_hash: &str) -> Result<(), Error>
pub fn create_ref(&self, commit_hash: &str) -> Result<(), Error>
Creates a reference in the cache directory that points branches to the correct commits within the blobs.
Sourcepub fn pointer_path(&self, commit_hash: &str) -> PathBuf
pub fn pointer_path(&self, commit_hash: &str) -> PathBuf
Get the path of the snapshot with the given commit hash.
This path contains symlink pointers to the files for this commit.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CacheRepo
impl RefUnwindSafe for CacheRepo
impl Send for CacheRepo
impl Sync for CacheRepo
impl Unpin for CacheRepo
impl UnsafeUnpin for CacheRepo
impl UnwindSafe for CacheRepo
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