pub struct LockfileManager { /* private fields */ }Expand description
Lockfile manager for rgen.lock
Implementations§
Source§impl LockfileManager
impl LockfileManager
Sourcepub fn lockfile_path(&self) -> &Path
pub fn lockfile_path(&self) -> &Path
Get the lockfile path
Sourcepub fn upsert(
&self,
pack_id: &str,
version: &str,
sha256: &str,
source: &str,
) -> Result<()>
pub fn upsert( &self, pack_id: &str, version: &str, sha256: &str, source: &str, ) -> Result<()>
Add or update a pack in the lockfile
Sourcepub fn is_installed(&self, pack_id: &str) -> Result<bool>
pub fn is_installed(&self, pack_id: &str) -> Result<bool>
Check if a pack is installed
Sourcepub fn installed_packs(&self) -> Result<HashMap<String, LockEntry>>
pub fn installed_packs(&self) -> Result<HashMap<String, LockEntry>>
Get installed packs as a map for quick lookup
Sourcepub fn stats(&self) -> Result<LockfileStats>
pub fn stats(&self) -> Result<LockfileStats>
Get lockfile statistics
Trait Implementations§
Source§impl Clone for LockfileManager
impl Clone for LockfileManager
Source§fn clone(&self) -> LockfileManager
fn clone(&self) -> LockfileManager
Returns a duplicate of the value. Read more
1.0.0 · 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 LockfileManager
impl RefUnwindSafe for LockfileManager
impl Send for LockfileManager
impl Sync for LockfileManager
impl Unpin for LockfileManager
impl UnwindSafe for LockfileManager
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