Enum cargo::core::resolver::ResolveVersion [−][src]
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
Historical baseline for when this abstraction was added.
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]
fn clone(&self) -> ResolveVersion
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for ResolveVersion
[src]
impl Debug for ResolveVersion
[src]
impl Eq for ResolveVersion
[src]
impl Ord for ResolveVersion
[src]
fn cmp(&self, other: &ResolveVersion) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<ResolveVersion> for ResolveVersion
[src]
fn eq(&self, other: &ResolveVersion) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl PartialOrd<ResolveVersion> for ResolveVersion
[src]
fn partial_cmp(&self, other: &ResolveVersion) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralEq for ResolveVersion
[src]
impl StructuralPartialEq for ResolveVersion
[src]
Auto Trait Implementations
impl RefUnwindSafe for ResolveVersion
impl Send for ResolveVersion
impl Sync for ResolveVersion
impl Unpin for ResolveVersion
impl UnwindSafe for ResolveVersion
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,