pub enum TransactionOperation<Old, New> {
Install(New),
Change {
old: Old,
new: New,
},
Reinstall {
old: Old,
new: New,
},
Remove(Old),
}Expand description
Describes an operation to perform
Variants§
Install(New)
The given package record should be installed
Change
Remove an old package and install another
Reinstall
Reinstall a package. This can happen if the Python version changed in the environment, we need to relink all noarch python packages in that case. Includes old and new because certain fields like the channel/url may have changed between installations
Remove(Old)
Completely remove a package
Implementations§
Source§impl<Old: Clone, New: Clone> TransactionOperation<&Old, &New>
impl<Old: Clone, New: Clone> TransactionOperation<&Old, &New>
Sourcepub fn to_owned(self) -> TransactionOperation<Old, New>
pub fn to_owned(self) -> TransactionOperation<Old, New>
Own records.
Source§impl<Old, New> TransactionOperation<Old, New>
impl<Old, New> TransactionOperation<Old, New>
Sourcepub fn record_to_install(&self) -> Option<&New>
pub fn record_to_install(&self) -> Option<&New>
Returns the record of the package to install for this operation. If this
operation does not refer to an installable package, None is
returned.
Source§impl<Old, New> TransactionOperation<Old, New>
impl<Old, New> TransactionOperation<Old, New>
Sourcepub fn record_to_remove(&self) -> Option<&Old>
pub fn record_to_remove(&self) -> Option<&Old>
Returns the record of the package to remove for this operation. If this
operation does not refer to an removable package, None is
returned.
Trait Implementations§
Source§impl<Old: Clone, New: Clone> Clone for TransactionOperation<Old, New>
impl<Old: Clone, New: Clone> Clone for TransactionOperation<Old, New>
Source§fn clone(&self) -> TransactionOperation<Old, New>
fn clone(&self) -> TransactionOperation<Old, New>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<Old: PartialEq, New: PartialEq> PartialEq for TransactionOperation<Old, New>
impl<Old: PartialEq, New: PartialEq> PartialEq for TransactionOperation<Old, New>
Source§fn eq(&self, other: &TransactionOperation<Old, New>) -> bool
fn eq(&self, other: &TransactionOperation<Old, New>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<Old: Eq, New: Eq> Eq for TransactionOperation<Old, New>
impl<Old, New> StructuralPartialEq for TransactionOperation<Old, New>
Auto Trait Implementations§
impl<Old, New> Freeze for TransactionOperation<Old, New>
impl<Old, New> RefUnwindSafe for TransactionOperation<Old, New>where
New: RefUnwindSafe,
Old: RefUnwindSafe,
impl<Old, New> Send for TransactionOperation<Old, New>
impl<Old, New> Sync for TransactionOperation<Old, New>
impl<Old, New> Unpin for TransactionOperation<Old, New>
impl<Old, New> UnwindSafe for TransactionOperation<Old, New>where
New: UnwindSafe,
Old: UnwindSafe,
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 moreCreates a shared type from an unshared type.