pub struct DiagnosticSeverities {
pub outdated: DiagnosticSeverity,
pub unknown: DiagnosticSeverity,
pub yanked: DiagnosticSeverity,
pub unsatisfiable: DiagnosticSeverity,
pub deprecated: DiagnosticSeverity,
pub mutable_ref_pin: DiagnosticSeverity,
pub mutable_ref_pin_enabled: bool,
}Expand description
Diagnostic severity levels for the four per-dependency issue categories.
Threaded from DiagnosticsConfig (deps-lsp) through
crate::Ecosystem::generate_diagnostics into generate_diagnostics_from_cache.
§Examples
use deps_core::DiagnosticSeverities;
use tower_lsp_server::ls_types::DiagnosticSeverity;
let severities = DiagnosticSeverities::default();
assert_eq!(severities.outdated, DiagnosticSeverity::HINT);
assert_eq!(severities.unknown, DiagnosticSeverity::WARNING);
assert_eq!(severities.yanked, DiagnosticSeverity::WARNING);
assert_eq!(severities.unsatisfiable, DiagnosticSeverity::WARNING);
assert_eq!(severities.deprecated, DiagnosticSeverity::WARNING);
assert_eq!(severities.mutable_ref_pin, DiagnosticSeverity::HINT);
assert!(severities.mutable_ref_pin_enabled);Fields§
§outdated: DiagnosticSeveritySeverity for a dependency with a newer version available.
unknown: DiagnosticSeveritySeverity for a dependency not found in the registry (or with an invalid name).
yanked: DiagnosticSeveritySeverity for a dependency pinned to a yanked/deprecated version.
unsatisfiable: DiagnosticSeveritySeverity for a dependency whose requirement matches zero published versions.
deprecated: DiagnosticSeveritySeverity for a dependency on a package the registry reports as deprecated/abandoned (issue #205).
mutable_ref_pin: DiagnosticSeveritySeverity for a GitHub Actions uses: step pinned to a mutable ref (a tag)
instead of a full commit SHA (issue #473). Unused by every ecosystem except
deps-github-actions today — see that crate’s
MUTABLE_REF_PIN_DIAGNOSTIC_CODE for the diagnostic this severity gates.
Tunes loudness only; see Self::mutable_ref_pin_enabled for the on/off
toggle.
mutable_ref_pin_enabled: boolWhether the mutable-ref-pin diagnostic (issue #473) runs at all, unused by
every ecosystem except deps-github-actions. Unlike every other field in
this struct, mutable_ref_pin alone cannot silence the diagnostic —
DiagnosticSeverity has no suppression value, and severity is never treated
as a suppression input anywhere in this codebase — so this diagnostic
additionally needs a real presence toggle, mirroring
deps_lsp::config::DiagnosticsConfig::vulnerabilities_enabled’s shape.
Trait Implementations§
Source§impl Clone for DiagnosticSeverities
impl Clone for DiagnosticSeverities
Source§fn clone(&self) -> DiagnosticSeverities
fn clone(&self) -> DiagnosticSeverities
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for DiagnosticSeverities
Source§impl Debug for DiagnosticSeverities
impl Debug for DiagnosticSeverities
Source§impl Default for DiagnosticSeverities
impl Default for DiagnosticSeverities
impl Eq for DiagnosticSeverities
Source§impl PartialEq for DiagnosticSeverities
impl PartialEq for DiagnosticSeverities
Source§fn eq(&self, other: &DiagnosticSeverities) -> bool
fn eq(&self, other: &DiagnosticSeverities) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for DiagnosticSeverities
Auto Trait Implementations§
impl Freeze for DiagnosticSeverities
impl RefUnwindSafe for DiagnosticSeverities
impl Send for DiagnosticSeverities
impl Sync for DiagnosticSeverities
impl Unpin for DiagnosticSeverities
impl UnsafeUnpin for DiagnosticSeverities
impl UnwindSafe for DiagnosticSeverities
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,
§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
§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
§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
key and return true if they are equal.