pub enum ConversationEvent {
AppMessage(AppMessage),
Leaving,
Error {
operation: String,
message: String,
},
OwnProposalSubmitted {
proposal_id: u32,
request: ConversationUpdateRequest,
},
VoteRequested {
proposal_id: u32,
request: ConversationUpdateRequest,
},
CommitApplied(Vec<ConversationUpdateRequest>),
PhaseChange(ConversationState),
WelcomeReady {
welcome: MemberWelcome,
minted_locally: bool,
},
ConsensusReached {
proposal_id: u32,
approved: bool,
timestamp: u64,
},
FreezeProgress {
received: usize,
expected: usize,
},
}Expand description
Per-conversation notification. Sessions append these to their pending
buffer; integrators drain via
crate::Conversation::drain_events once per polling cycle. All
variants are fire-and-forget — no failure path back to the conversation.
Variants§
AppMessage(AppMessage)
Decrypted application message (chat, vote request, proposal notification, ban request, …).
Leaving
The local member is out of this conversation (self-leave commit merged, or removed by a steward). The integrator should remove the registry entry and clean up the consensus scope.
Error
A background operation (e.g., vote submission) failed. UI may surface; state has already been reconciled.
OwnProposalSubmitted
The local user just submitted request as a new proposal with the
creator’s vote bundled. UI should record for history; no “please vote”
affordance.
VoteRequested
A peer’s consensus proposal needs the local user’s vote. The
integrator surfaces a vote affordance however it wishes; an auto-vote
fires after the configured delay if no manual vote arrives. Peer-side
mirror of Self::OwnProposalSubmitted.
CommitApplied(Vec<ConversationUpdateRequest>)
A freeze round merged a commit; batch is the set of approved
proposals that landed in this commit (in insertion order).
PhaseChange(ConversationState)
Conversation transitioned into state.
WelcomeReady
A merged commit added members. Carries the MLS welcome blob and the
encrypted ConversationSync payload bundled for atomic delivery.
Fires on every member — the committing steward mints it
(minted_locally == true) and broadcasts it to the group, so peers
receive the same welcome (minted_locally == false). The
application decides who delivers it to the joiners and how.
ConsensusReached
A consensus session on this conversation resolved. Emitted before
the protocol effects (commit candidate, freeze, score apply, …)
run, so UI fanout sees the decision in the same polling cycle as
the state change that follows. timestamp is the upstream
consensus library’s stamp on the bus event.
FreezeProgress
Freeze-round candidate progress changed: received stewards have
submitted candidates out of expected. Emitted by poll() when in
Freezing and the count changed since the previous emission. The
integrator can surface this as a progress indicator without polling
freeze_candidate_count().
Trait Implementations§
Source§impl Clone for ConversationEvent
impl Clone for ConversationEvent
Source§fn clone(&self) -> ConversationEvent
fn clone(&self) -> ConversationEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ConversationEvent
impl RefUnwindSafe for ConversationEvent
impl Send for ConversationEvent
impl Sync for ConversationEvent
impl Unpin for ConversationEvent
impl UnsafeUnpin for ConversationEvent
impl UnwindSafe for ConversationEvent
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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