Skip to main content

step_stored

Function step_stored 

Source
pub fn step_stored<S: State>(
    current: &S,
    stored: UpcastEvent,
) -> Result<S, Permanent>
Expand description

Takes a state a single stored event further, running the upcasters on the way, exactly as reading from the database would. If the upcasters turn the event into several, the state evolves by all of them. Otherwise, it behaves like step.

ยงErrors

Fails permanently if an upcaster fails, if an event has a type the state has no rule for, or if its data does not match its type.