pub enum Notification<T> {
    MemberUp(T),
    MemberDown(T),
    Active,
    Idle,
    Defunct,
    Rejoin(T),
}
Expand description

A Notification contains information about high-level relevant state changes in the cluster or Foca itself.

Variants

MemberUp(T)

Foca discovered a new active member with identity T.

MemberDown(T)

A previously active member has been declared down by the cluster.

If Foca detects a down member but didn’t know about its activity before, this notification will not be emitted.

Can only happen if MemberUp(T) happened before.

Active

Foca’s current identity is known by at least one active member of the cluster.

Fired when successfully joining a cluster for the first time and every time after a successful identity change.

Idle

All known active members have either left the cluster or been declared down.

Defunct

Foca’s current identity has been declared down.

Manual intervention via Foca::change_identity or Foca::reuse_down_identity is required to return to a functioning state.

Rejoin(T)

Foca automatically changed its identity and rejoined the cluster after being declared down.

This happens instead of Defunct when identities opt-in on Identity::renew() functionality.

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

Deserialize this value from the given Serde deserializer. Read more

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

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

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.

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

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