pub enum Event {
StateChanged {
from: NodeState,
to: NodeState,
},
PayloadReceived(DeliveredPayload),
Control {
from: MemberId,
opcode: ControlOpcode,
transition_id: TransitionId,
request_id: u32,
args: Vec<u8>,
},
Error {
code: u16,
class: ErrorClass,
retryable: bool,
fatal: bool,
reason: String,
},
EpochAdvanced {
epoch: u64,
transition_id: TransitionId,
},
CoordinatorElectionNeeded,
BecameCoordinator,
CoordinatorClaim {
claimant: MemberId,
},
}Expand description
Events surfaced by the GBP layer.
Variants§
StateChanged
Node FSM changed state.
PayloadReceived(DeliveredPayload)
Payload delivered to a sub-protocol (Text / Audio / Signal). Control
frames are handled internally and do not surface as
Event::PayloadReceived.
Control
A control plane message was received and parsed.
Fields
§
opcode: ControlOpcodeDecoded opcode.
§
transition_id: TransitionIdtransition_id carried by the message.
Error
An error was raised.
Fields
§
class: ErrorClassError class.
EpochAdvanced
Epoch transition has been applied locally.
CoordinatorElectionNeeded
Coordinator silence exceeded T_coordinator_grace. The application
should call GroupNode::claim_coordinator if this node has the
lowest MemberId among currently active members.
BecameCoordinator
This node successfully claimed the coordinator role (sent
CAPABILITIES_ADVERTISE with coordinator_claim=true).
CoordinatorClaim
A remote member broadcast a coordinator claim.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnsafeUnpin for Event
impl UnwindSafe for Event
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Declassify for T
impl<T> Declassify for T
type Declassified = T
fn declassify(self) -> T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more