Struct raft::JointConfig[][src]

pub struct JointConfig { /* fields omitted */ }
Expand description

A configuration of two groups of (possibly overlapping) majority configurations. Decisions require the support of both majorities.

Implementations

Creates a new configuration using the given IDs.

Creates an empty configuration with given capacity.

Returns the largest committed index for the given joint quorum. An index is jointly committed if it is committed in both constituent majorities.

The bool flag indicates whether the index is computed by group commit algorithm successfully. It’s true only when both majorities use group commit.

Takes a mapping of voters to yes/no (true/false) votes and returns a result indicating whether the vote is pending, lost, or won. A joint quorum requires both majority quorums to vote in favor.

Clears all IDs.

Returns true if (and only if) there is only one voting member (i.e. the leader) in the current configuration.

Returns an iterator over two hash set without cloning.

Check if an id is a voter.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.