pub const fn severity_rank(severity: Option<AdvisorySeverity>) -> u8Expand description
What: Map advisory severity to a numeric rank for sorting (higher is worse).
Inputs:
severity: Optional advisory severity value.
Output:
- Numeric rank where larger numbers indicate higher severity (Critical highest).
Details:
- Returns
0when severity is missing to ensure advisories without severity fall last. - Keeps ordering stable across both news feed sorting and advisory-specific listings.