pub struct Lockfile {
pub version: u32,
pub metadata: LockfileMetadata,
pub tools: HashMap<String, LockfileEntry>,
pub binary_index: BinaryIndex,
}Expand description
The full bv.lock file (schema version 1).
Format is stable: bv lock --check fails if the generated lockfile
would differ from the on-disk one on any stability field.
Fields§
§version: u32Schema version; currently always 1.
metadata: LockfileMetadata§tools: HashMap<String, LockfileEntry>§binary_index: BinaryIndexDerived routing table: binary name -> tool id.
Rebuilt by rebuild_binary_index whenever tools change.
Implementations§
Source§impl Lockfile
impl Lockfile
pub fn new() -> Self
pub fn from_toml_str(s: &str) -> Result<Self>
pub fn to_toml_string(&self) -> Result<String>
Sourcepub fn rebuild_binary_index(
&mut self,
overrides: &HashMap<String, String>,
) -> Result<(), String>
pub fn rebuild_binary_index( &mut self, overrides: &HashMap<String, String>, ) -> Result<(), String>
Rebuild binary_index from each tool’s binaries list.
overrides maps binary name to the tool id that wins when two tools
expose the same name. Without an override, a collision returns Err.
Sourcepub fn is_equivalent_to(&self, other: &Self) -> bool
pub fn is_equivalent_to(&self, other: &Self) -> bool
True when both lockfiles describe the same set of tools at the same resolved versions and digests.
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