pub enum DependencyStatus {
Installed {
version: String,
},
ToInstall,
ToUpgrade {
current: String,
required: String,
},
Conflict {
reason: String,
},
Missing,
}Expand description
Status of a dependency relative to the current system state.
This enum represents the installation status and requirements for a dependency, used throughout the dependency resolution process to track what actions are needed.
Variants§
Installed
Already installed and version matches requirement.
ToInstall
Not installed, needs to be installed.
ToUpgrade
Installed but outdated, needs upgrade.
Conflict
Conflicts with existing packages.
Missing
Cannot be found in configured repositories or AUR.
Implementations§
Source§impl DependencyStatus
impl DependencyStatus
Sourcepub const fn is_installed(&self) -> bool
pub const fn is_installed(&self) -> bool
What: Check if the dependency is already installed.
Inputs:
self: The dependency status to check.
Output:
- Returns
trueif the dependency is installed (regardless of version).
Details:
- Returns
truefor bothInstalledandToUpgradevariants.
Sourcepub const fn needs_action(&self) -> bool
pub const fn needs_action(&self) -> bool
What: Check if the dependency needs action (install or upgrade).
Inputs:
self: The dependency status to check.
Output:
- Returns
trueif the dependency needs to be installed or upgraded.
Details:
- Returns
trueforToInstallandToUpgradevariants.
Sourcepub const fn is_conflict(&self) -> bool
pub const fn is_conflict(&self) -> bool
What: Check if there’s a conflict with this dependency.
Inputs:
self: The dependency status to check.
Output:
- Returns
trueif the dependency has a conflict.
Details:
- Returns
trueonly for theConflictvariant.
Sourcepub const fn priority(&self) -> u8
pub const fn priority(&self) -> u8
What: Get a priority value for sorting (lower = more urgent).
Inputs:
self: The dependency status to get priority for.
Output:
- Returns a numeric priority where lower numbers indicate higher urgency.
Details:
- Priority order: Conflict (0) < Missing (1) <
ToInstall(2) <ToUpgrade(3) < Installed (4).
Trait Implementations§
Source§impl Clone for DependencyStatus
impl Clone for DependencyStatus
Source§fn clone(&self) -> DependencyStatus
fn clone(&self) -> DependencyStatus
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DependencyStatus
impl Debug for DependencyStatus
Source§impl<'de> Deserialize<'de> for DependencyStatus
impl<'de> Deserialize<'de> for DependencyStatus
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for DependencyStatus
impl Display for DependencyStatus
Source§impl PartialEq for DependencyStatus
impl PartialEq for DependencyStatus
Source§impl Serialize for DependencyStatus
impl Serialize for DependencyStatus
impl Eq for DependencyStatus
impl StructuralPartialEq for DependencyStatus
Auto Trait Implementations§
impl Freeze for DependencyStatus
impl RefUnwindSafe for DependencyStatus
impl Send for DependencyStatus
impl Sync for DependencyStatus
impl Unpin for DependencyStatus
impl UnwindSafe for DependencyStatus
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
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
key and return true if they are equal.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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
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.