pub struct LockFile {
pub version: String,
pub packs: HashMap<String, Vec<LockedDependency>>,
}Expand description
Lock file structure (mai.lock)
Fields§
§version: StringLock file format version
packs: HashMap<String, Vec<LockedDependency>>Locked dependencies by tool
Implementations§
Source§impl LockFile
impl LockFile
pub fn new() -> Self
pub fn load(path: &Path) -> Result<Self>
pub fn save(&self, path: &Path) -> Result<()>
pub fn add_dependency(&mut self, tool: &str, dep: LockedDependency)
pub fn get_dependencies(&self, tool: Option<&str>) -> Vec<&LockedDependency>
pub fn find_dependency( &self, tool: &str, name: &str, ) -> Option<&LockedDependency>
Sourcepub fn verify_integrity(&self, data_dir: &Path) -> IntegrityReport
pub fn verify_integrity(&self, data_dir: &Path) -> IntegrityReport
Verify all locked dependencies have valid hashes
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LockFile
impl<'de> Deserialize<'de> for LockFile
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for LockFile
impl RefUnwindSafe for LockFile
impl Send for LockFile
impl Sync for LockFile
impl Unpin for LockFile
impl UnsafeUnpin for LockFile
impl UnwindSafe for LockFile
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