pub struct HttpEvidenceExecutor { /* private fields */ }Expand description
Real HTTP executor that produces typed evidence for the decision runner.
§Examples
use std::sync::Arc;
use url::Url;
use termivar_scanner::{
DecisionActionExecutor, HttpEvidenceExecutor, HttpEvidencePolicy, HttpProbeProvider,
SubjectHttpProbeProvider,
};
let target = Url::parse("https://example.test/")?;
let policy = HttpEvidencePolicy::for_origin(target)?;
let probes: Arc<dyn HttpProbeProvider> =
Arc::new(SubjectHttpProbeProvider::default());
let executor = HttpEvidenceExecutor::new(policy, probes)?;
assert_eq!(executor.id(), "http.evidence");Implementations§
Source§impl HttpEvidenceExecutor
impl HttpEvidenceExecutor
Sourcepub fn new(
policy: HttpEvidencePolicy,
probes: Arc<dyn HttpProbeProvider>,
) -> Result<Self, HttpEvidenceError>
pub fn new( policy: HttpEvidencePolicy, probes: Arc<dyn HttpProbeProvider>, ) -> Result<Self, HttpEvidenceError>
Creates a redirect-disabled executor with the standard identity.
Sourcepub fn with_id(
id: impl Into<String>,
policy: HttpEvidencePolicy,
probes: Arc<dyn HttpProbeProvider>,
) -> Result<Self, HttpEvidenceError>
pub fn with_id( id: impl Into<String>, policy: HttpEvidencePolicy, probes: Arc<dyn HttpProbeProvider>, ) -> Result<Self, HttpEvidenceError>
Creates a redirect-disabled executor with a host-selected identity.
Sourcepub fn with_payload_binding(self, binding: HttpHeaderPayloadBinding) -> Self
pub fn with_payload_binding(self, binding: HttpHeaderPayloadBinding) -> Self
Binds a header-valued payload strategy this executor will materialize.
The executor then advertises exact support for the binding’s strategy reference and, when a decision case selects it, derives one control or candidate artifact per turn and applies it before dispatch. Actions that do not select the reference are unaffected, so an executor may serve both plain discovery and strategy-driven differential turns.
Sourcepub fn payload_strategy_reference(&self) -> Option<&PayloadStrategyRef>
pub fn payload_strategy_reference(&self) -> Option<&PayloadStrategyRef>
Returns the bound payload strategy reference, if any.
Sourcepub fn policy(&self) -> &HttpEvidencePolicy
pub fn policy(&self) -> &HttpEvidencePolicy
Returns the immutable execution policy.
Trait Implementations§
Source§impl DecisionActionExecutor for HttpEvidenceExecutor
impl DecisionActionExecutor for HttpEvidenceExecutor
Source§fn supports_payload_strategy(&self, strategy: &PayloadStrategyRef) -> bool
fn supports_payload_strategy(&self, strategy: &PayloadStrategyRef) -> bool
Returns whether this executor can materialize an exact strategy revision. Read more
Source§fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 DecisionExecutionRequest,
) -> Pin<Box<dyn Future<Output = Result<Vec<Evidence>, DecisionExecutorError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 DecisionExecutionRequest,
) -> Pin<Box<dyn Future<Output = Result<Vec<Evidence>, DecisionExecutorError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Executes one semantic action request and returns immutable observations only. Read more
Source§fn execution_class(&self) -> DecisionExecutionClass
fn execution_class(&self) -> DecisionExecutionClass
Returns how this executor is driven. Defaults to
DecisionExecutionClass::TransportBound so existing executors keep
their current transport-accounted execution path unchanged.Source§fn execute_with_snapshot<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
request: &'life1 DecisionExecutionRequest,
snapshot: &'life2 KnowledgeSnapshot,
) -> Pin<Box<dyn Future<Output = Result<Vec<Evidence>, DecisionExecutorError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn execute_with_snapshot<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
request: &'life1 DecisionExecutionRequest,
snapshot: &'life2 KnowledgeSnapshot,
) -> Pin<Box<dyn Future<Output = Result<Vec<Evidence>, DecisionExecutorError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Executes a
DecisionExecutionClass::LocalKnowledge action from an
immutable subject-scoped snapshot, returning immutable observations under
the same provenance contract as execute. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for HttpEvidenceExecutor
impl !UnwindSafe for HttpEvidenceExecutor
impl Freeze for HttpEvidenceExecutor
impl Send for HttpEvidenceExecutor
impl Sync for HttpEvidenceExecutor
impl Unpin for HttpEvidenceExecutor
impl UnsafeUnpin for HttpEvidenceExecutor
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