[][src]Struct actix_raft::messages::MembershipConfig

pub struct MembershipConfig {
    pub is_in_joint_consensus: bool,
    pub members: Vec<NodeId>,
    pub non_voters: Vec<NodeId>,
    pub removing: Vec<NodeId>,
}

A model of the membership configuration of the cluster.

Fields

is_in_joint_consensus: bool

A flag indicating if the system is currently in a joint consensus state.

members: Vec<NodeId>

Voting members of the Raft cluster.

non_voters: Vec<NodeId>

Non-voting members of the cluster.

These nodes are being brought up-to-speed by the leader and will be transitioned over to being standard members once they are up-to-date.

removing: Vec<NodeId>

The set of nodes which are to be removed after joint consensus is complete.

Methods

impl MembershipConfig[src]

pub fn contains(&self, x: &NodeId) -> bool[src]

Check if the given NodeId exists in this membership config.

This checks only the contents of members & non_voters.

pub fn all_nodes(&self) -> impl Iterator<Item = &NodeId>[src]

Get an iterator over all nodes in the current config.

pub fn len(&self) -> usize[src]

Get the length of the members & non_voters vectors.

Trait Implementations

impl Clone for MembershipConfig[src]

impl Debug for MembershipConfig[src]

impl<'de> Deserialize<'de> for MembershipConfig[src]

impl Eq for MembershipConfig[src]

impl PartialEq<MembershipConfig> for MembershipConfig[src]

impl Serialize for MembershipConfig[src]

impl StructuralEq for MembershipConfig[src]

impl StructuralPartialEq for MembershipConfig[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,