pub trait Step:
AsAny
+ Send
+ Sync {
// Required methods
fn config_hash(&self) -> CacheKey;
fn meta(&self) -> StepMeta;
fn poll(&self, ctx: &StepCtx<'_>) -> Result<Transition>;
}Expand description
An effectful node.
Implementors are registered in the runtime’s step library by node id, the same way filters are.
Required Methods§
Sourcefn config_hash(&self) -> CacheKey
fn config_hash(&self) -> CacheKey
Hash of this step’s configuration. Same config, same hash — it is part of every journal key this step writes.
Sourcefn poll(&self, ctx: &StepCtx<'_>) -> Result<Transition>
fn poll(&self, ctx: &StepCtx<'_>) -> Result<Transition>
Advance one turn.
Called with ctx.turn == 0 and no results to start; thereafter with
the results of whatever it last asked for. Must be deterministic
given the same context and results — that is the whole basis of
replay. Put the non-determinism in an Effect, where it gets
recorded.