pub struct StandardWebDecisionProfile { /* private fields */ }Expand description
Complete opt-in standard web decision profile.
Construction validates every layer and binds execution to one immutable
HttpEvidencePolicy. Installation prepares the decision loop and executor
registry on owned clones. Ontology definitions are committed under one
knowledge-base write lock only after every other layer has preflighted.
§Examples
use url::Url;
use termivar_scanner::{
AdaptationLimits, BenefitScore, DecisionExecutorRegistry, DecisionLoop,
DecisionLoopConfig, ExperiencePolicy, HttpEvidencePolicy, KnowledgeBase,
PlanningContext, RiskScore, StandardWebDecisionProfile,
};
let target = Url::parse("https://example.test/")?;
let config = DecisionLoopConfig::new(
PlanningContext::new(
BenefitScore::from_percent(80)?,
100,
RiskScore::from_percent(40)?,
),
AdaptationLimits::default(),
ExperiencePolicy::default(),
8,
)?;
let knowledge = KnowledgeBase::new();
let mut decision_loop = DecisionLoop::new(config);
let mut executors = DecisionExecutorRegistry::new();
StandardWebDecisionProfile::new(HttpEvidencePolicy::for_origin(target)?)?
.install(&knowledge, &mut decision_loop, &mut executors)?;Implementations§
Source§impl StandardWebDecisionProfile
impl StandardWebDecisionProfile
Sourcepub fn new(policy: HttpEvidencePolicy) -> Result<Self, StandardWebDecisionError>
pub fn new(policy: HttpEvidencePolicy) -> Result<Self, StandardWebDecisionError>
Builds and validates all four layers before any host state is changed.
Sourcepub fn install(
&self,
knowledge: &KnowledgeBase,
decision_loop: &mut DecisionLoop,
executors: &mut DecisionExecutorRegistry,
) -> Result<StandardWebDecisionInstallReport, StandardWebDecisionError>
pub fn install( &self, knowledge: &KnowledgeBase, decision_loop: &mut DecisionLoop, executors: &mut DecisionExecutorRegistry, ) -> Result<StandardWebDecisionInstallReport, StandardWebDecisionError>
Installs the full profile with preflighted all-or-nothing semantics.
Sourcepub fn reasoning(&self) -> &StandardWebReasoning
pub fn reasoning(&self) -> &StandardWebReasoning
Returns the standard ontology and fingerprint profile.
Sourcepub fn planning(&self) -> &StandardWebAttackProfile
pub fn planning(&self) -> &StandardWebAttackProfile
Returns the standard utility-planner profile.
Sourcepub fn execution(&self) -> &StandardWebDiscoveryExecutorProfile
pub fn execution(&self) -> &StandardWebDiscoveryExecutorProfile
Returns the scope-bound discovery executor profile.
Sourcepub fn verification(&self) -> &StandardWebVerificationProfile
pub fn verification(&self) -> &StandardWebVerificationProfile
Returns the passive and active verifier profile.
Auto Trait Implementations§
impl !RefUnwindSafe for StandardWebDecisionProfile
impl !UnwindSafe for StandardWebDecisionProfile
impl Freeze for StandardWebDecisionProfile
impl Send for StandardWebDecisionProfile
impl Sync for StandardWebDecisionProfile
impl Unpin for StandardWebDecisionProfile
impl UnsafeUnpin for StandardWebDecisionProfile
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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