pub struct Evidence {
pub signal: String,
pub source: EvidenceSource,
pub weight: u32,
}Expand description
One matched signal in the evidence bundle.
An Evidence row is the smallest auditable unit the
classifier emits. Each row carries:
- the literal
signaltext that matched, - the
EvidenceSourceit came from, - and the
weight(sourced from the vendor definition) that the classifier added to the vendor’s score for this match.
§Example
use stygian_charon::vendor_classifier::{Evidence, EvidenceSource};
let ev = Evidence {
signal: "_abck=".to_string(),
source: EvidenceSource::Cookie,
weight: 5,
};
assert_eq!(ev.source, EvidenceSource::Cookie);
assert_eq!(ev.weight, 5);Fields§
§signal: StringThe literal text that matched (case-folded, lower-cased).
source: EvidenceSourceWhich input channel produced the match.
weight: u32Weight contributed to the vendor score (from the vendor
definition’s signals[*].weight).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Evidence
impl<'de> Deserialize<'de> for Evidence
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Evidence
impl StructuralPartialEq for Evidence
Auto Trait Implementations§
impl Freeze for Evidence
impl RefUnwindSafe for Evidence
impl Send for Evidence
impl Sync for Evidence
impl Unpin for Evidence
impl UnsafeUnpin for Evidence
impl UnwindSafe for Evidence
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
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
Compare self to
key and return true if they are equal.