pub struct ChallengeProbe {
pub name: String,
pub description: String,
pub category: ProbeCategory,
pub transaction: TransactionView,
pub expectation: ProbeExpectation,
}Expand description
A single challenge-style probe with its input, expected outcome, and metadata.
§Example
use stygian_charon::probe::{ChallengeProbe, ProbeCategory, ProbeExpectation};
use stygian_charon::types::{AntiBotProvider, TransactionView};
use std::collections::BTreeMap;
let probe = ChallengeProbe {
name: "cf-ray-header".to_string(),
description: "Cloudflare CF-Ray header present".to_string(),
category: ProbeCategory::Adversarial,
transaction: TransactionView {
url: "https://example.com/".to_string(),
status: 403,
response_headers: {
let mut h = BTreeMap::new();
h.insert("cf-ray".to_string(), "abc123-LHR".to_string());
h
},
response_body_snippet: None,
},
expectation: ProbeExpectation {
expected_provider: AntiBotProvider::Cloudflare,
min_confidence: 0.5,
},
};Fields§
§name: StringShort identifier used in reports.
description: StringHuman-readable description of what this probe covers.
category: ProbeCategoryProbe category.
transaction: TransactionViewSynthetic transaction to classify.
expectation: ProbeExpectationExpected outcome.
Trait Implementations§
Source§impl Clone for ChallengeProbe
impl Clone for ChallengeProbe
Source§fn clone(&self) -> ChallengeProbe
fn clone(&self) -> ChallengeProbe
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 ChallengeProbe
impl Debug for ChallengeProbe
Source§impl<'de> Deserialize<'de> for ChallengeProbe
impl<'de> Deserialize<'de> for ChallengeProbe
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 ChallengeProbe
impl PartialEq for ChallengeProbe
Source§impl Serialize for ChallengeProbe
impl Serialize for ChallengeProbe
impl StructuralPartialEq for ChallengeProbe
Auto Trait Implementations§
impl Freeze for ChallengeProbe
impl RefUnwindSafe for ChallengeProbe
impl Send for ChallengeProbe
impl Sync for ChallengeProbe
impl Unpin for ChallengeProbe
impl UnsafeUnpin for ChallengeProbe
impl UnwindSafe for ChallengeProbe
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