pub struct PlannedUpdateItem {
pub name: String,
pub current: CurrentVersion,
pub outcome: Outcome,
pub advisory_ids: Vec<String>,
pub ignore_rule_overridden: bool,
pub gossip_excluded_version: Option<ConcreteVersion>,
pub cooldown_fallback: Option<CooldownFallbackNote>,
}Expand description
One dependency’s disposition in an UpdatePlan.
Fields§
§name: StringThe dependency’s declared (raw) name.
current: CurrentVersionThe version this dependency is currently pinned to, its declared requirement text when
no concrete in-use version could be resolved, or CurrentVersion::Unknown when
neither is available.
outcome: OutcomeThis item’s disposition — the target version considered (even when no edit was
written) lives inside Self::outcome’s own variant (#1615: folding it into Outcome
makes a target only representable where the variant actually carries one, rather than
as a second, independently settable item-level field). Read it via Self::target.
advisory_ids: Vec<String>OSV advisory ids this item resolves. Populated in --security-only mode, and also in
default mode for a cooldown-fallback decision that names a Flagged latest/fallback
verdict (spec 075 FR-011/FR-012) — empty for an Unverified verdict, which carries no
advisory list to report.
ignore_rule_overridden: boolWhether a matching [update].ignore rule exists but was overridden (FR-008,
--security-only mode only — the rule never applies in default mode, since a match
there is reported via Outcome::Skipped with reason SkipReason::IgnoreRule
instead).
gossip_excluded_version: Option<ConcreteVersion>A newer version excluded from this item’s Self::target by an active GOSSIP cooldown
finding (issue #1521 item 1) — mirrors check’s identical
deps_core::lsp_helpers::PackageVersions::gossip_excluded_version attribution
(crate::report::to_finding). Populated only for Outcome::Applied items in default
mode; always None under --security-only, whose fix target never reads a
GOSSIP-filtered latest at all.
cooldown_fallback: Option<CooldownFallbackNote>Spec 075 FR-013: attribution for a cooldown-fallback decision — one field so
CooldownFallbackNote::AppliedInsteadOf and CooldownFallbackNote::Blocked can
never both be set for the same item. None when no fallback candidate was ever
consulted for this occurrence (CooldownDisposition::NotEvaluated/Cleared, or
Blocked { fallback: None }).
Implementations§
Source§impl PlannedUpdateItem
impl PlannedUpdateItem
Sourcepub fn new(
name: String,
current: CurrentVersion,
outcome: Outcome,
advisory_ids: Vec<String>,
ignore_rule_overridden: bool,
gossip_excluded_version: Option<ConcreteVersion>,
cooldown_fallback: Option<CooldownFallbackNote>,
) -> Self
pub fn new( name: String, current: CurrentVersion, outcome: Outcome, advisory_ids: Vec<String>, ignore_rule_overridden: bool, gossip_excluded_version: Option<ConcreteVersion>, cooldown_fallback: Option<CooldownFallbackNote>, ) -> Self
Builds a PlannedUpdateItem from its already-computed fields.
Replaces the near-identical hand-rolled struct literals security.rs’s four
terminal-outcome builders and this module’s own resolve_occurrence build closure
previously each constructed independently (issue #1551 finding 5) — a field change
affecting those two call sites now only requires touching this constructor. Fields stay
pub and other construction sites remain plain struct literals (e.g. deps-cli’s
exit.rs, this module’s own tests, and the doctest above) — this constructor does not
make the type #[non_exhaustive] or migrate every existing literal to it.
Sourcepub const fn target(&self) -> Option<&ConcreteVersion>
pub const fn target(&self) -> Option<&ConcreteVersion>
This item’s considered/applied target version — delegates to Outcome::target, the
sole read path since #1615 folded the target into Self::outcome’s own variant.
Sourcepub fn reason(&self) -> String
pub fn reason(&self) -> String
A one-line human-readable reason for Self::outcome (FR-021’s reason field).
Trait Implementations§
Source§impl Clone for PlannedUpdateItem
impl Clone for PlannedUpdateItem
Auto Trait Implementations§
impl Freeze for PlannedUpdateItem
impl RefUnwindSafe for PlannedUpdateItem
impl Send for PlannedUpdateItem
impl Sync for PlannedUpdateItem
impl Unpin for PlannedUpdateItem
impl UnsafeUnpin for PlannedUpdateItem
impl UnwindSafe for PlannedUpdateItem
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<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> ⓘ
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> ⓘ
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 more