pub struct CargoLockfile(/* private fields */);Expand description
The cargo package lockfile.
Implementations§
Source§impl CargoLockfile
impl CargoLockfile
Sourcepub fn add_package(&mut self, manifest: &CargoManifest) -> &mut Self
pub fn add_package(&mut self, manifest: &CargoManifest) -> &mut Self
Adds a package to the lockfile.
Sourcepub fn with_package(self, manifest: &CargoManifest) -> Self
pub fn with_package(self, manifest: &CargoManifest) -> Self
Builds the lockfile with a package.
Sourcepub fn get_package_version(&self, package: impl AsRef<str>) -> Option<Version>
pub fn get_package_version(&self, package: impl AsRef<str>) -> Option<Version>
Gets the package version.
Sourcepub fn set_package_version(
&mut self,
package: impl AsRef<str>,
version: impl Into<Version>,
)
pub fn set_package_version( &mut self, package: impl AsRef<str>, version: impl Into<Version>, )
Sets the package version.
Sourcepub fn packages_mut(&mut self) -> PackagesMut<'_>
pub fn packages_mut(&mut self) -> PackagesMut<'_>
Gets the mutable packages section.
Trait Implementations§
Source§impl Clone for CargoLockfile
impl Clone for CargoLockfile
Source§fn clone(&self) -> CargoLockfile
fn clone(&self) -> CargoLockfile
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CargoLockfile
impl Debug for CargoLockfile
Source§impl Default for CargoLockfile
impl Default for CargoLockfile
Source§impl Display for CargoLockfile
impl Display for CargoLockfile
impl Eq for CargoLockfile
Source§impl FromStr for CargoLockfile
impl FromStr for CargoLockfile
Source§impl PartialEq for CargoLockfile
impl PartialEq for CargoLockfile
Auto Trait Implementations§
impl Freeze for CargoLockfile
impl RefUnwindSafe for CargoLockfile
impl Send for CargoLockfile
impl Sync for CargoLockfile
impl Unpin for CargoLockfile
impl UnsafeUnpin for CargoLockfile
impl UnwindSafe for CargoLockfile
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
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
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
fn equivalent(&self, key: &K) -> bool
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<Q> ToOwnedEquivalent<<Q as ToOwned>::Owned> for Q
impl<Q> ToOwnedEquivalent<<Q as ToOwned>::Owned> for Q
fn to_owned_equivalent(&self) -> <Q as ToOwned>::Owned
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.