Skip to main content

StepFn

Trait StepFn 

Source
pub trait StepFn<S: KernelState>: Send + Sync {
    // Required method
    fn next(&self, state: &S) -> Result<Next, KernelError>;
}
Expand description

Step function: given current state, returns the next action (emit / do / interrupt / complete). Graph and Agent are compiled to this interface.

Required Methods§

Source

fn next(&self, state: &S) -> Result<Next, KernelError>

Implementors§