pub enum MlsGroupState {
    PendingCommit(Box<PendingCommitState>),
    Operational,
    Inactive,
}Expand description
MlsGroupState determines the state of an MlsGroup. The different
states and their transitions are as follows:
- 
MlsGroupState::Operational: This is the main state of the group, which allows access to all of its functionality, (except merging pending commits, see theMlsGroupState::PendingCommitfor more information) and it’s the state the group starts in (except when created viaMlsGroup::external_commit_builder(), see the functions documentation for more information). From thisOperational, the group state can either transition toMlsGroupState::Inactive, when it processes a commit that removes this client from the group, or toMlsGroupState::PendingCommit, when this client creates a commit.
- 
MlsGroupState::Inactive: A group can enter this state from any other state when it processes a commit that removes this client from the group. This is a terminal state that the group can not exit from. If the clients wants to re-join the group, it can either be added by a group member or it can join via external commit.
- 
MlsGroupState::PendingCommit: This state is split into two possible sub-states, one for each Commit type:PendingCommitState::MemberandPendingCommitState::External:- 
If the client creates a commit for this group, the PendingCommitstate is entered withPendingCommitState::Memberand with theStagedCommitas additional state variable. In this state, it can perform the same operations as in theMlsGroupState::Operational, except that it cannot create proposals or commits. However, it can merge or clear the storedStagedCommit, where both actions result in a transition to theMlsGroupState::Operational. Additionally, if a commit from another group member is processed, the own pending commit is also cleared and either theInactivestate is entered (if this client was removed from the group as part of the processed commit), or theOperationalstate is entered.
- 
A group can enter the PendingCommitState::Externalsub-state only as the initial state when the group is created viaMlsGroup::external_commit_builder(). In contrast to thePendingCommitState::MemberPendingCommitstate, the only possible functionality that can be used is theMlsGroup::merge_pending_commit()function, which merges the pending external commit and transitions the state toMlsGroupState::PendingCommit. For more information on the external commit process, seeMlsGroup::external_commit_builder()or Section 11.2.1 of the MLS specification.
 
- 
Variants§
PendingCommit(Box<PendingCommitState>)
There is currently a pending Commit that hasn’t been merged yet.
Operational
The group state is in an opertaional state, where new messages and Commits can be created.
Inactive
The group is inactive because the member has been removed.
Trait Implementations§
Source§impl Debug for MlsGroupState
 
impl Debug for MlsGroupState
Source§impl<'de> Deserialize<'de> for MlsGroupState
 
impl<'de> Deserialize<'de> for MlsGroupState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
    __D: Deserializer<'de>,
 
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
    __D: Deserializer<'de>,
Source§impl Serialize for MlsGroupState
 
impl Serialize for MlsGroupState
impl Entity<CURRENT_VERSION> for MlsGroupState
impl GroupState<CURRENT_VERSION> for MlsGroupState
Auto Trait Implementations§
impl Freeze for MlsGroupState
impl RefUnwindSafe for MlsGroupState
impl Send for MlsGroupState
impl Sync for MlsGroupState
impl Unpin for MlsGroupState
impl UnwindSafe for MlsGroupState
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> 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