Processor

Trait Processor 

Source
pub trait Processor: Send + Sync {
    type Input;
    type State: Send + Sync;

    // Required methods
    fn build_initial_state(&self) -> Self::State;
    fn process(&self, input: Self::Input, state: &Self::State);
}
Expand description

Processes input data and modifies shared state based on the result.

Required Associated Types§

Source

type Input

The type of input to the processor.

Source

type State: Send + Sync

The state that the processor acts on.

Required Methods§

Source

fn build_initial_state(&self) -> Self::State

Builds the initial state for the processor.

Source

fn process(&self, input: Self::Input, state: &Self::State)

Processes the input, potentially updating the reflector state.

Implementors§