pub struct Lockfile { /* private fields */ }Expand description
A parsed lockfile.
Implementations§
Source§impl Lockfile
impl Lockfile
Sourcepub fn parse(format: Format, text: &str) -> Result<Self>
pub fn parse(format: Format, text: &str) -> Result<Self>
Parse text as format.
§Errors
Returns an error when the text does not parse, or an entry lacks the
fields its format requires, such as a Cargo.lock package without a
name.
Sourcepub fn is_idle_for(
&self,
format: Format,
lock_dir: &Path,
member: &Member,
) -> bool
pub fn is_idle_for( &self, format: Format, lock_dir: &Path, member: &Member, ) -> bool
Whether a bump of member cannot change this format lockfile at
lock_dir, so its owner has nothing to do.
That applies only when the lockfile has an entry for the member and no
such entry follows the member’s version. A member with no entry stays
uncertain in every format, so the owner runs. A Cargo.lock or
uv.lock may name it by a name this check does not know. That happens
when a virtual workspace’s bump moves members that inherit its version.
In a bun.lock or package-lock.json, a directory that fails to
match must not skip a needed refresh either.
Sourcepub fn compare(&self, newer: &Self) -> Vec<Change>
pub fn compare(&self, newer: &Self) -> Vec<Change>
What changed from self to newer, in key order. An entry whose key
carries its version, a registry package’s, shows a version move as
one Change::Changed instead of a removal and an addition.
Trait Implementations§
impl Eq for Lockfile
impl StructuralPartialEq for Lockfile
Auto Trait Implementations§
impl Forget for Lockfile
impl Freeze for Lockfile
impl Move for Lockfile
impl RefUnwindSafe for Lockfile
impl Send for Lockfile
impl Sync for Lockfile
impl Unpin for Lockfile
impl UnsafeUnpin for Lockfilewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const LeafNode<String, Entry> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, Entry)>>: UnsafeUnpin,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.