use add_async_trait;
use crateRaftTypeConfig;
use crateStorageError;
use crateCommand;
use crateRaftStateMachine;
/// Defines behaviors of a runtime to support the protocol engine.
///
/// An Engine defines the consensus algorithm, i.e., what to do(`command`) when some `event`
/// happens:
///
/// It receives events such as `write-log-entry` from a client,
/// or `elect` from a timer, and outputs `command`, such as
/// `append-entry-to-storage`, or `commit-entry-at-index-5` to a runtime to execute.
///
/// A `RaftRuntime` talks to `RaftLogStorage` and `RaftNetworkV2` to get things done.
///
/// See the [Engine and Runtime Architecture guide] for the write flow and command/event loop.
///
/// [Engine and Runtime Architecture guide]: crate::docs::components::engine_runtime
pub