pub struct Lockfile {
pub version: u8,
pub capabilities: BTreeMap<String, CapabilityLockEntry>,
pub packs: BTreeMap<String, PackLockEntry>,
}Fields§
§version: u8The schema version the file was read as, or LOCKFILE_VERSION for a
lockfile built in memory. Writers ignore it and emit the current one.
capabilities: BTreeMap<String, CapabilityLockEntry>§packs: BTreeMap<String, PackLockEntry>Installed packs by name (RFC-110 D2). The members are the
capabilities whose source names the pack; this map holds what the
pack has as a whole, chiefly where it came from. Kept in step with
the members on every write by Lockfile::normalized_packs.
Implementations§
Source§impl Lockfile
impl Lockfile
Sourcepub fn pack_members(&self, pack_name: &str) -> Vec<String>
pub fn pack_members(&self, pack_name: &str) -> Vec<String>
Every capability the lockfile attributes to one pack, sorted by id.
Sourcepub fn normalized_packs(&self) -> BTreeMap<String, PackLockEntry>
pub fn normalized_packs(&self) -> BTreeMap<String, PackLockEntry>
The packs section as it should be written: one entry for every pack a member names, with the version and digest its members record, and none for a pack whose members are all gone. A pack no entry describes, such as one read from a version 3 file, came from an artifact, with the registry its members recorded.