[][src]Enum cargo::core::ResolveVersion

pub enum ResolveVersion {
    V1,
    V2,
}

A version to indicate how a Cargo.lock should be serialized. Currently V2 is the default when creating a new lockfile. If a V1 lockfile already exists, it will stay as V1.

It's theorized that we can add more here over time to track larger changes to the Cargo.lock format, but we've yet to see how that strategy pans out.

Variants

V1

Historical baseline for when this abstraction was added.

V2

A more compact format, more amenable to avoiding source-control merge conflicts. The dependencies arrays are compressed and checksums are listed inline. Introduced in 2019 in version 1.38. New lockfiles use V2 by default starting in 1.41.

Implementations

impl ResolveVersion[src]

pub fn default_for_new_lockfiles() -> ResolveVersion[src]

The default way to encode new Cargo.lock files.

It's important that if a new version of ResolveVersion is added that this is not updated until at least the support for the version is in the stable release of Rust. It's ok for this to be newer than default_for_old_lockfiles below.

pub fn default_for_old_lockfiles() -> ResolveVersion[src]

The default way to encode old preexisting Cargo.lock files. This is often trailing the new lockfiles one above to give older projects a longer time to catch up.

It's important that this trails behind default_for_new_lockfiles for quite some time. This gives projects a quite large window to update in where we don't force updates, so if projects span many versions of Cargo all those versions of Cargo will have support for a new version of the lock file.

Trait Implementations

impl Clone for ResolveVersion[src]

impl Copy for ResolveVersion[src]

impl Debug for ResolveVersion[src]

impl Eq for ResolveVersion[src]

impl Ord for ResolveVersion[src]

impl PartialEq<ResolveVersion> for ResolveVersion[src]

impl PartialOrd<ResolveVersion> for ResolveVersion[src]

impl StructuralEq for ResolveVersion[src]

impl StructuralPartialEq for ResolveVersion[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,