Skip to main content

step_in

Function step_in 

Source
pub fn step_in<P: Protocol + ?Sized>(
    p: &mut P,
    event: ProtoEvent<P>,
    now: Time,
    rng: &mut dyn RngCore,
    store: &mut dyn Store<P::Meta, P::Entry>,
) -> Vec<ProtoEffect<P>> ⓘ
Expand description

Deliver one event to p against a store the caller owns, and return the effects it emitted.

step gives the protocol a fresh store each call, which is right for one that keeps nothing durably and wrong for one that does — a write in one call would be invisible in the next. A test that cares about what survives passes its own store here and can inspect it afterwards.