pub enum SessionEvent {
AppMessage(AppMessage),
Joined,
Leaving,
Error {
operation: String,
message: String,
},
OwnProposalSubmitted {
proposal_id: u32,
request: ConversationUpdateRequest,
},
CommitApplied(Vec<ConversationUpdateRequest>),
PhaseChange(ConversationState),
ProposalDecided(ConsensusEvent),
}Expand description
Per-conversation notification. Sessions append these to their pending
buffer; integrators drain via
crate::app::SessionRunner::drain_events once per polling cycle. All
variants are fire-and-forget — no failure path back to the session.
Variants§
AppMessage(AppMessage)
Decrypted application message (chat, vote request, proposal notification, ban request, …).
Joined
Welcome processed and MLS state initialised. Epoch timers + state transitions are already wired — surface to UI only.
Leaving
The user is out of this conversation (self-leave commit merged, or
someone else removed us). The session entry is about to be removed
from User’s registry.
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.
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.
ProposalDecided(ConsensusEvent)
A consensus session reached an outcome. Fired after the runner has applied the result to local state.
Trait Implementations§
Source§impl Clone for SessionEvent
impl Clone for SessionEvent
Source§fn clone(&self) -> SessionEvent
fn clone(&self) -> SessionEvent
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 SessionEvent
impl RefUnwindSafe for SessionEvent
impl Send for SessionEvent
impl Sync for SessionEvent
impl Unpin for SessionEvent
impl UnsafeUnpin for SessionEvent
impl UnwindSafe for SessionEvent
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
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> 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