pub enum EvidenceSource {
Cookie,
Header,
ChallengeUrl,
BodyMarker,
Script,
}Expand description
Where a single classifier signal came from.
The five variants are the documented input channels for
crate::vendor_classifier::VendorClassifier:
| Source | Where it was found |
|---|---|
Cookie | A Set-Cookie response header or Cookie header. |
Header | Any other response header. |
ChallengeUrl | A challenge/redirect URL (request URL or Location). |
BodyMarker | A literal string in the response body snippet. |
Script | A literal in a <script> snippet (inline JS). |
The taxonomy is #[serde(rename_all = "snake_case")] so the
wire form is stable across releases.
§Example
use stygian_charon::vendor_classifier::EvidenceSource;
let src = EvidenceSource::Cookie;
assert_eq!(src.label(), "cookie");Variants§
Cookie
Set-Cookie or Cookie header.
Header
Any non-cookie response header.
ChallengeUrl
Challenge/redirect URL (request URL or Location header).
BodyMarker
Literal string in the response body.
Script
Literal in a <script> block (inline JS challenge).
Implementations§
Source§impl EvidenceSource
impl EvidenceSource
Sourcepub const fn label(self) -> &'static str
pub const fn label(self) -> &'static str
Stable, human-readable label.
§Example
use stygian_charon::vendor_classifier::EvidenceSource;
assert_eq!(EvidenceSource::Cookie.label(), "cookie");
assert_eq!(EvidenceSource::Header.label(), "header");
assert_eq!(EvidenceSource::ChallengeUrl.label(), "challenge_url");
assert_eq!(EvidenceSource::BodyMarker.label(), "body_marker");
assert_eq!(EvidenceSource::Script.label(), "script");Trait Implementations§
Source§impl Clone for EvidenceSource
impl Clone for EvidenceSource
Source§fn clone(&self) -> EvidenceSource
fn clone(&self) -> EvidenceSource
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 EvidenceSource
impl Debug for EvidenceSource
Source§impl<'de> Deserialize<'de> for EvidenceSource
impl<'de> Deserialize<'de> for EvidenceSource
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 Hash for EvidenceSource
impl Hash for EvidenceSource
Source§impl Ord for EvidenceSource
impl Ord for EvidenceSource
Source§fn cmp(&self, other: &EvidenceSource) -> Ordering
fn cmp(&self, other: &EvidenceSource) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for EvidenceSource
impl PartialEq for EvidenceSource
Source§impl PartialOrd for EvidenceSource
impl PartialOrd for EvidenceSource
Source§impl Serialize for EvidenceSource
impl Serialize for EvidenceSource
impl Copy for EvidenceSource
impl Eq for EvidenceSource
impl StructuralPartialEq for EvidenceSource
Auto Trait Implementations§
impl Freeze for EvidenceSource
impl RefUnwindSafe for EvidenceSource
impl Send for EvidenceSource
impl Sync for EvidenceSource
impl Unpin for EvidenceSource
impl UnsafeUnpin for EvidenceSource
impl UnwindSafe for EvidenceSource
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§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.