pub enum ProcessResult {
AppMessage(AppMessage),
Proposal(Proposal),
Vote(Vote),
LeaveGroup,
GetUpdateRequest(GroupUpdateRequest),
JoinedGroup(String),
GroupUpdated,
Noop,
}Expand description
Result of processing an inbound packet.
This enum represents all possible outcomes from process_inbound.
Pass it to dispatch_result to handle consensus routing
and get a DispatchAction for your application.
§Variants
AppMessage- A chat message or other application-level messageProposal/Vote- Consensus messages that need forwardingGetUpdateRequest- Steward received a membership change requestJoinedGroup- Successfully joined via welcome messageGroupUpdated- MLS state changed (batch commit applied)LeaveGroup- User was removed from the groupNoop- Nothing to do (message not for us, already processed, etc.)
Variants§
AppMessage(AppMessage)
An application message was received (chat message, etc.).
The message has been decrypted and is ready for display.
Proposal(Proposal)
A consensus proposal was received from another peer.
Should be forwarded to the consensus service via
forward_incoming_proposal.
Vote(Vote)
A consensus vote was received from another peer.
Should be forwarded to the consensus service via
forward_incoming_vote.
LeaveGroup
The user was removed from the group.
Application should clean up group state and notify the UI.
GetUpdateRequest(GroupUpdateRequest)
Steward received a membership change request (key package or ban).
Application should start a consensus vote for this request.
JoinedGroup(String)
The user successfully joined a group via welcome message.
Contains the group name. Application should transition state from PendingJoin to Working.
GroupUpdated
Group MLS state was updated (batch commit applied).
Application should transition state from Waiting to Working.
Noop
No action needed.
The message was not for us, was a duplicate, or required no action.
Trait Implementations§
Source§impl Clone for ProcessResult
impl Clone for ProcessResult
Source§fn clone(&self) -> ProcessResult
fn clone(&self) -> ProcessResult
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProcessResult
impl Debug for ProcessResult
Source§impl TryFrom<AppMessage> for ProcessResult
impl TryFrom<AppMessage> for ProcessResult
Auto Trait Implementations§
impl Freeze for ProcessResult
impl RefUnwindSafe for ProcessResult
impl Send for ProcessResult
impl Sync for ProcessResult
impl Unpin for ProcessResult
impl UnwindSafe for ProcessResult
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