Creates a new [`Engine`] with an empty task queue and the passed initial [`EngineState`].
(
initial_state: EngineState,
state_sender: Sender<EngineState>,
task_queue_length: Sender<usize>,
)
| 54 | impl<EngineClient_: EngineClient> Engine<EngineClient_> { |
| 55 | /// Creates a new [`Engine`] with an empty task queue and the passed initial [`EngineState`]. |
| 56 | pub fn new( |
| 57 | initial_state: EngineState, |
| 58 | state_sender: Sender<EngineState>, |
| 59 | task_queue_length: Sender<usize>, |
| 60 | ) -> Self { |
| 61 | Self { |
| 62 | state: initial_state, |
| 63 | state_sender, |
| 64 | task_queue_length, |
| 65 | tasks: BinaryHeap::default(), |
| 66 | next_task_sequence: 0, |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | /// Returns a reference to the inner [`EngineState`]. |
| 71 | pub const fn state(&self) -> &EngineState { |
nothing calls this directly
no outgoing calls
no test coverage detected