pub struct AdvisoryDb {
pub missing: bool,
/* private fields */
}Fields§
§missing: boolSet when the requested DB path was absent; used to emit a soft warning
rather than failing the run (important for --offline).
Implementations§
Source§impl AdvisoryDb
impl AdvisoryDb
pub fn empty() -> Self
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Sourcepub fn load_from_dir(dir: &Path) -> Result<Self, RustinelError>
pub fn load_from_dir(dir: &Path) -> Result<Self, RustinelError>
Load every *.toml advisory found recursively under dir.
If dir does not exist, returns an empty DB flagged as missing (no
error) so that offline runs without a cached DB continue to work.
Sourcepub fn default_cache_dir() -> Option<PathBuf>
pub fn default_cache_dir() -> Option<PathBuf>
Resolve the default advisory cache directory (~/.cargo/advisory-db if
present, else a rustinel-specific cache path).
Sourcepub fn match_lockfile(&self, lock: &LockfileModel) -> Vec<RiskSignal>
pub fn match_lockfile(&self, lock: &LockfileModel) -> Vec<RiskSignal>
Produce risk signals for any locked package matched by an advisory.
Trait Implementations§
Source§impl Debug for AdvisoryDb
impl Debug for AdvisoryDb
Source§impl Default for AdvisoryDb
impl Default for AdvisoryDb
Source§fn default() -> AdvisoryDb
fn default() -> AdvisoryDb
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AdvisoryDb
impl RefUnwindSafe for AdvisoryDb
impl Send for AdvisoryDb
impl Sync for AdvisoryDb
impl Unpin for AdvisoryDb
impl UnsafeUnpin for AdvisoryDb
impl UnwindSafe for AdvisoryDb
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