Struct mls_rs::group::ReinitClient
source · pub struct ReinitClient<C: ClientConfig + Clone> { /* private fields */ }
Implementations§
source§impl<C: ClientConfig + Clone> ReinitClient<C>
impl<C: ClientConfig + Clone> ReinitClient<C>
A Client
that can be used to create or join a new group
that is based on properties defined by a ReInitProposal
committed in a previously accepted commit.
sourcepub fn generate_key_package(&self) -> Result<MlsMessage, MlsError>
pub fn generate_key_package(&self) -> Result<MlsMessage, MlsError>
Generate a key package for the new group. The key package can
be used in ReinitClient::commit
.
sourcepub fn commit(
self,
new_key_packages: Vec<MlsMessage>
) -> Result<(Group<C>, Vec<MlsMessage>), MlsError>
pub fn commit( self, new_key_packages: Vec<MlsMessage> ) -> Result<(Group<C>, Vec<MlsMessage>), MlsError>
Create the new group using new key packages of all group members, possibly
generated by ReinitClient::generate_key_package
.
Warning
This function will fail if the number of members in the reinitialized group is not the same as the prior group roster.
sourcepub fn join(
self,
welcome: MlsMessage,
tree_data: Option<&[u8]>
) -> Result<(Group<C>, NewMemberInfo), MlsError>
pub fn join( self, welcome: MlsMessage, tree_data: Option<&[u8]> ) -> Result<(Group<C>, NewMemberInfo), MlsError>
Join a reinitialized group that was created by ReinitClient::commit
.
Auto Trait Implementations§
impl<C> RefUnwindSafe for ReinitClient<C>where C: RefUnwindSafe,
impl<C> Send for ReinitClient<C>
impl<C> Sync for ReinitClient<C>
impl<C> Unpin for ReinitClient<C>where C: Unpin,
impl<C> UnwindSafe for ReinitClient<C>where C: UnwindSafe,
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