Skip to main content

ConversationEvent

Enum ConversationEvent 

Source
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.

Fields

§operation: String
§message: String
§

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.

Fields

§proposal_id: u32
§

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.

Fields

§proposal_id: u32
§

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.

Fields

§minted_locally: bool
§

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.

Fields

§proposal_id: u32
§approved: bool
§timestamp: u64
§

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().

Fields

§received: usize
§expected: usize

Trait Implementations§

Source§

impl Clone for ConversationEvent

Source§

fn clone(&self) -> ConversationEvent

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ConversationEvent

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

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

fn in_current_span(self) -> Instrumented<Self>

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

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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