pub struct Anomaly {
pub severity: Severity,
pub code: &'static str,
pub kind: AnomalyKind,
pub note: String,
pub confidence: Option<f32>,
}Expand description
A SQLite forensic anomaly: an observation graded by severity, with a stable
code and note derived from its AnomalyKind so they cannot drift.
Fields§
§severity: SeveritySeverity, derived from kind.
code: &'static strStable machine-readable code, derived from kind.
kind: AnomalyKindThe classified anomaly.
note: StringHuman-readable note, derived from kind.
confidence: Option<f32>Heuristic confidence, present for inferential findings (e.g. a carved
deleted record); None for structurally-certain header observations.
Implementations§
Source§impl Anomaly
impl Anomaly
Sourcepub fn new(kind: AnomalyKind) -> Self
pub fn new(kind: AnomalyKind) -> Self
Build an Anomaly, deriving severity/code/note from kind.
Sourcepub fn with_confidence(self, confidence: f32) -> Self
pub fn with_confidence(self, confidence: f32) -> Self
Attach a heuristic confidence (used for carved deleted records).
Trait Implementations§
Source§impl Observation for Anomaly
impl Observation for Anomaly
Source§fn severity(&self) -> Option<Severity>
fn severity(&self) -> Option<Severity>
Severity, or
None if the analyzer deliberately does not grade this kind.Source§fn confidence(&self) -> Option<Confidence>
fn confidence(&self) -> Option<Confidence>
Heuristic confidence, if inferential (default: none).
Source§fn category(&self) -> Category
fn category(&self) -> Category
Analytical lens; defaults to
Category::from_code of Observation::code.
Override when a code’s keyword classification is wrong.Source§fn subjects(&self) -> Vec<SubjectRef>
fn subjects(&self) -> Vec<SubjectRef>
Non-disk subjects this kind is about (default: none).
impl StructuralPartialEq for Anomaly
Auto Trait Implementations§
impl Freeze for Anomaly
impl RefUnwindSafe for Anomaly
impl Send for Anomaly
impl Sync for Anomaly
impl Unpin for Anomaly
impl UnsafeUnpin for Anomaly
impl UnwindSafe for Anomaly
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