Struct raft::ProgressSet
[−]
[src]
pub struct ProgressSet { /* fields omitted */ }
ProgressSet
contains several Progress
es,
which could be Leader
, Follower
and Learner
.
Methods
impl ProgressSet
[src]
fn new(voter_size: usize, learner_size: usize) -> Self
[src]
fn voters(&self) -> &FlatMap<u64, Progress>
[src]
fn learners(&self) -> &FlatMap<u64, Progress>
[src]
fn nodes(&self) -> Vec<u64>
[src]
fn learner_nodes(&self) -> Vec<u64>
[src]
fn get(&self, id: u64) -> Option<&Progress>
[src]
fn get_mut(&mut self, id: u64) -> Option<&mut Progress>
[src]
fn iter(&self) -> Chain<Iter<u64, Progress>, Iter<u64, Progress>>
[src]
fn iter_mut(&mut self) -> Chain<IterMut<u64, Progress>, IterMut<u64, Progress>>
[src]
fn insert_voter(&mut self, id: u64, pr: Progress)
[src]
fn insert_learner(&mut self, id: u64, pr: Progress)
[src]
fn remove(&mut self, id: u64) -> Option<Progress>
[src]
fn promote_learner(&mut self, id: u64)
[src]
Trait Implementations
impl Default for ProgressSet
[src]
fn default() -> ProgressSet
[src]
Returns the "default value" for a type. Read more
impl Clone for ProgressSet
[src]
fn clone(&self) -> ProgressSet
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more