[][src]Struct async_raft::raft::MembershipConfig

pub struct MembershipConfig {
    pub members: HashSet<NodeId>,
    pub members_after_consensus: Option<HashSet<NodeId>>,
}

A model of the membership configuration of the cluster.

Fields

members: HashSet<NodeId>

All members of the Raft cluster.

members_after_consensus: Option<HashSet<NodeId>>

All members of the Raft cluster after joint consensus is finalized.

The presence of a value here indicates that the config is in joint consensus.

Implementations

impl MembershipConfig[src]

pub fn all_nodes(&self) -> HashSet<u64>[src]

Get an iterator over all nodes in the current config.

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

Check if the given NodeId exists in this membership config.

When in joint consensus, this will check both config groups.

pub fn is_in_joint_consensus(&self) -> bool[src]

Check to see if the config is currently in joint consensus.

pub fn new_initial(id: NodeId) -> Self[src]

Create a new initial config containing only the given node ID.

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<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument 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>, 

impl<T> WithSubscriber for T[src]