openraft 0.9.22

Advanced Raft consensus
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::error::Fatal;
use crate::error::Infallible;
use crate::AsyncRuntime;
use crate::NodeId;

/// The running state of RaftCore
pub(in crate::raft) enum CoreState<NID, A>
where
    NID: NodeId,
    A: AsyncRuntime,
{
    /// The RaftCore task is still running.
    Running(A::JoinHandle<Result<Infallible, Fatal<NID>>>),

    /// The RaftCore task has finished. The return value of the task is stored.
    Done(Result<Infallible, Fatal<NID>>),
}