Struct simple_raft::core::RaftState [−][src]
pub struct RaftState<Log, Random, NodeId> { /* fields omitted */ }
Expand description
The complete state of a Raft node.
Implementations
pub fn new(
node_id: NodeId,
peers: BTreeSet<NodeId>,
log: Log,
random: Random,
config: RaftConfig
) -> Self
pub fn take_committed(&mut self) -> CommittedIter<'_, Log>ⓘNotable traits for CommittedIter<'_, Log>impl<Log: RaftLog> Iterator for CommittedIter<'_, Log> type Item = LogEntry;
Notable traits for CommittedIter<'_, Log>
impl<Log: RaftLog> Iterator for CommittedIter<'_, Log> type Item = LogEntry;