pub struct VendorClassification {
pub top_vendor: VendorId,
pub confidence: f64,
pub is_high_confidence: bool,
pub ranked: Vec<VendorScore>,
pub evidence: EvidenceBundle,
pub threshold: f64,
}Expand description
Full vendor classification output.
Carries the ranked scoreboard, the top vendor (the confidence-bearing winner), the confidence in the top vendor, the evidence bundle the score was computed from, and the high-confidence flag the operator-facing policy layer reads to decide whether to escalate.
§Example
use stygian_charon::vendor_classifier::{VendorClassification, VendorId, EvidenceBundle};
let classification = VendorClassification {
top_vendor: VendorId::Cloudflare,
confidence: 0.85,
is_high_confidence: true,
ranked: Vec::new(),
evidence: EvidenceBundle::default(),
threshold: 0.60,
};
assert_eq!(classification.top_vendor, VendorId::Cloudflare);
assert!(classification.is_high_confidence);Fields§
§top_vendor: VendorIdVendor with the highest (deterministically tie-broken) score.
confidence: f64Confidence in top_vendor in [0.0, 1.0].
is_high_confidence: booltrue when confidence >= threshold (the “high confidence”
policy-routing flag).
ranked: Vec<VendorScore>Ranked scoreboard (top first).
evidence: EvidenceBundleFull evidence bundle the score was computed from.
threshold: f64Threshold the is_high_confidence flag was evaluated against.
Implementations§
Source§impl VendorClassification
impl VendorClassification
Sourcepub fn is_identified(&self) -> bool
pub fn is_identified(&self) -> bool
true when at least one vendor-specific signal matched.
Sourcepub fn is_unknown(&self) -> bool
pub fn is_unknown(&self) -> bool
true when the classification is a clean “no vendor”
signal (no evidence at all).
Trait Implementations§
Source§impl Clone for VendorClassification
impl Clone for VendorClassification
Source§fn clone(&self) -> VendorClassification
fn clone(&self) -> VendorClassification
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VendorClassification
impl Debug for VendorClassification
Source§impl<'de> Deserialize<'de> for VendorClassification
impl<'de> Deserialize<'de> for VendorClassification
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
Source§impl PartialEq for VendorClassification
impl PartialEq for VendorClassification
Source§impl Serialize for VendorClassification
impl Serialize for VendorClassification
impl StructuralPartialEq for VendorClassification
Auto Trait Implementations§
impl Freeze for VendorClassification
impl RefUnwindSafe for VendorClassification
impl Send for VendorClassification
impl Sync for VendorClassification
impl Unpin for VendorClassification
impl UnsafeUnpin for VendorClassification
impl UnwindSafe for VendorClassification
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