Skip to main content

rstm_core/actors/traits/
executor.rs

1/*
2    Appellation: engine <module>
3    Created At: 2026.01.11:13:48:50
4    Contrib: @FL03
5*/
6
7use super::Driver;
8
9use crate::programs::Program;
10use rstm_state::RawState;
11
12/// The [`Executor`] trait defines the basis for compatible engines within the system.
13pub trait Executor<Q, A>
14where
15    Q: RawState + PartialEq,
16    A: PartialEq,
17{
18    type Driver: Driver<Q, A>;
19
20    private!();
21
22    fn load(&mut self, program: Program<Q, A>);
23
24    fn run(&mut self) -> crate::Result<()>;
25}