pub enum Participation<R> {
    Active,
    PartiallyActive(R),
    Passive,
}
Expand description

Reflects a Node’s possible modes of participation.

When a node shuts down, it returns a final snapshot. This snapshot can be used to restart the node. When restarted in such a fashion, the node is aware of any and all commitments it made previously.

Conversely, when a node crashes and restarts off some other snapshot, it is unaware of any commitments it made prior to crashing. To prevent the node from inadvertantly breaking any such commitments and introducing inconsistencies, it is started in passive mode.

While in passive mode, a node does not vote and does not accept any entries. It remains in this mode until all rounds it may have participated in before have been settled.

Variants

Active

The node will actively participate in any round.

PartiallyActive(R)

The node will only participate actively in the given or later rounds.

When the given round becomes the next round, i.e. an entry was applied for its preceding round, the node will transition into Active participation.

Passive

The node is fully passive and won’t participate in any round.

The node will observe communications and determine a lower bound for the rounds in which it can participate without causing inconsistencies. Once the lower bound is found, an Event::Activate event will be emitted and the node transitions into PartiallyActive participation.

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

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

Returns the argument unchanged.

Thaws this value.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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)

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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more