pub trait Processor: Send + Sync {
// Required method
fn process<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
state: &'life1 mut State,
event: Event<'life2>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
Collects events as the algorithm runs and mutates the composition’s state.
Required Methods§
Sourcefn process<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
state: &'life1 mut State,
event: Event<'life2>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn process<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
state: &'life1 mut State,
event: Event<'life2>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Process an event, accumulating facts into state. Request-bearing events
(Event::Request, Event::Decision) may also be rewritten in place.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl Processor for AffinityRouter
impl Processor for StageClassifier
Observe the final cascade choice, including judge and fall-open decisions.