Skip to main content

Lockfile

Struct Lockfile 

Source
pub struct Lockfile { /* private fields */ }
Expand description

A parsed lockfile.

Implementations§

Source§

impl Lockfile

Source

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.

Source

pub fn entries(&self) -> impl Iterator<Item = &Entry>

Every entry, in key order.

Source

pub fn members(&self) -> impl Iterator<Item = &Entry>

The workspace members.

Source

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.

Source

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§

Source§

impl Clone for Lockfile

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Lockfile

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Lockfile

Source§

impl PartialEq for Lockfile

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Lockfile

Auto Trait Implementations§

§

impl Forget for Lockfile

§

impl Freeze for Lockfile
where *const u8 is !null: Freeze, PhantomData<u8>: Freeze, *const LeafNode<String, Entry> is !null: Freeze, PhantomData<(Owned, LeafOrInternal)>: Freeze, PhantomData<Box<(String, Entry)>>: Freeze,

§

impl Move for Lockfile

§

impl RefUnwindSafe for Lockfile

§

impl Send for Lockfile
where RawVecInner: Send, NodeRef<Owned, String, Entry, LeafOrInternal>: Send, BoxRaw<(String, Entry)>: Send,

§

impl Sync for Lockfile
where RawVecInner: Sync, NodeRef<Owned, String, Entry, LeafOrInternal>: Sync, BoxRaw<(String, Entry)>: Sync,

§

impl Unpin for Lockfile
where *const u8 is !null: Unpin, *const LeafNode<String, Entry> is !null: Unpin, Box<(String, Entry)>: Unpin,

§

impl UnsafeUnpin for Lockfile
where *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
where RawVecInner: UnwindSafe, BTreeMap<String, Entry>: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, O> Matches<O> for T
where T: PartialEq<O>,

Source§

fn validate_matches(&self, other: &O) -> bool

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.