pub struct DependencyCheck {
pub dependency: Dependency,
pub installed: Option<Version>,
pub in_range: Option<Version>,
pub latest: Version,
pub target: Option<Version>,
pub target_spec: Option<VersionSpec>,
pub severity: Option<UpdateSeverity>,
pub force_spec: Option<VersionSpec>,
}Expand description
Result of checking a dependency for updates
Fields§
§dependency: DependencyThe original dependency
installed: Option<Version>Currently installed version (from lock file)
in_range: Option<Version>Latest version within the constraint
latest: VersionAbsolute latest version
target: Option<Version>The target version for display (in_range if available, else latest)
target_spec: Option<VersionSpec>The VersionSpec to write when updating to target
severity: Option<UpdateSeverity>The severity of the update (based on installed → target)
force_spec: Option<VersionSpec>The VersionSpec to write when force updating to latest
Implementations§
Source§impl DependencyCheck
impl DependencyCheck
Sourcepub fn has_update(&self) -> bool
pub fn has_update(&self) -> bool
Check if this dependency has any update available
Sourcepub fn has_newer_available(&self) -> bool
pub fn has_newer_available(&self) -> bool
Check if there’s a newer version available beyond the target
Sourcepub fn current_version(&self) -> Option<&Version>
pub fn current_version(&self) -> Option<&Version>
Get the current version (installed or from spec)
Trait Implementations§
Source§impl Clone for DependencyCheck
impl Clone for DependencyCheck
Source§fn clone(&self) -> DependencyCheck
fn clone(&self) -> DependencyCheck
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for DependencyCheck
impl RefUnwindSafe for DependencyCheck
impl Send for DependencyCheck
impl Sync for DependencyCheck
impl Unpin for DependencyCheck
impl UnsafeUnpin for DependencyCheck
impl UnwindSafe for DependencyCheck
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