pub struct GroupState<'a, Provider> { /* private fields */ }Available on (32-bit or 64-bit) and (crate features
test-utils) only.Expand description
All of the state for a group and its members
Implementations§
Source§impl<Provider: OpenMlsProvider> GroupState<'_, Provider>
impl<Provider: OpenMlsProvider> GroupState<'_, Provider>
pub fn assert_membership(&self)
Source§impl<'a, Provider: OpenMlsProvider> GroupState<'a, Provider>
impl<'a, Provider: OpenMlsProvider> GroupState<'a, Provider>
Sourcepub fn new_from_party(
group_id: GroupId,
pre_group_state: PreGroupPartyState<'a, Provider>,
mls_group_create_config: MlsGroupCreateConfig,
) -> Result<Self, GroupError<Provider>>
pub fn new_from_party( group_id: GroupId, pre_group_state: PreGroupPartyState<'a, Provider>, mls_group_create_config: MlsGroupCreateConfig, ) -> Result<Self, GroupError<Provider>>
Create a new GroupState from a single party
Sourcepub fn members_mut<const N: usize>(
&mut self,
names: &[&'static str; N],
) -> [&mut MemberState<'a, Provider>; N]
pub fn members_mut<const N: usize>( &mut self, names: &[&'static str; N], ) -> [&mut MemberState<'a, Provider>; N]
Get mutable references to specified MemberStates as a fixed-size array,
in the order of the names provided in names.
At least one member must be requested.
Sourcepub fn deliver_and_apply(
&mut self,
message: MlsMessageIn,
) -> Result<(), GroupError<Provider>>
pub fn deliver_and_apply( &mut self, message: MlsMessageIn, ) -> Result<(), GroupError<Provider>>
Deliver_and_apply a message to all parties
Sourcepub fn deliver_and_apply_if(
&mut self,
message: MlsMessageIn,
condition: impl Fn(&MemberState<'a, Provider>) -> bool,
) -> Result<(), GroupError<Provider>>
pub fn deliver_and_apply_if( &mut self, message: MlsMessageIn, condition: impl Fn(&MemberState<'a, Provider>) -> bool, ) -> Result<(), GroupError<Provider>>
Deliver_and_apply a message to all parties if a provided condition is met
Sourcepub fn deliver_and_apply_welcome(
&mut self,
recipient: PreGroupPartyState<'a, Provider>,
mls_group_join_config: MlsGroupJoinConfig,
welcome: Welcome,
tree: Option<RatchetTreeIn>,
) -> Result<(), GroupError<Provider>>
pub fn deliver_and_apply_welcome( &mut self, recipient: PreGroupPartyState<'a, Provider>, mls_group_join_config: MlsGroupJoinConfig, welcome: Welcome, tree: Option<RatchetTreeIn>, ) -> Result<(), GroupError<Provider>>
Deliver_and_apply a welcome to a single party, and initialize a group for that party
Sourcepub fn untrack_member(&mut self, name: &'static str)
pub fn untrack_member(&mut self, name: &'static str)
Drop a member from the internal hashmap. This does not delete the member from any
MlsGroup
pub fn add_member( &mut self, add_config: AddMemberConfig<'a, Provider>, ) -> Result<(), GroupError<Provider>>
Auto Trait Implementations§
impl<'a, Provider> Freeze for GroupState<'a, Provider>
impl<'a, Provider> RefUnwindSafe for GroupState<'a, Provider>where
Provider: RefUnwindSafe,
impl<'a, Provider> Send for GroupState<'a, Provider>where
Provider: Sync,
impl<'a, Provider> Sync for GroupState<'a, Provider>where
Provider: Sync,
impl<'a, Provider> Unpin for GroupState<'a, Provider>
impl<'a, Provider> UnwindSafe for GroupState<'a, Provider>where
Provider: RefUnwindSafe,
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
Mutably borrows from an owned value. Read more
§impl<T> Classify for T
impl<T> Classify for T
type Classified = T
fn classify(self) -> T
§impl<T> Declassify for T
impl<T> Declassify for T
type Declassified = T
fn declassify(self) -> 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>
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 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>
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