pub trait Processor<S = ()>: Send + Sync {
// Required method
fn process<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
state: &'life1 mut S,
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 S,
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 S,
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.