pub trait ProjectionReducer<Event> {
type Projection;
type Error;
// Required methods
fn seed(&self, event: &Event) -> Result<Self::Projection, Self::Error>;
fn apply(
&self,
projection: &mut Self::Projection,
event: &Event,
) -> Result<(), Self::Error>;
}Expand description
Fold events into a projection that can later be rehydrated with #[validators].
Required Associated Types§
Sourcetype Projection
type Projection
The output projection type.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".