pub struct ReinitClient<C: ClientConfig + Clone> { /* private fields */ }
Implementations§
Source§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.
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>,
new_leaf_node_extensions: ExtensionList,
) -> Result<(Group<C>, Vec<MlsMessage>), MlsError>
pub fn commit( self, new_key_packages: Vec<MlsMessage>, new_leaf_node_extensions: ExtensionList, ) -> 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<ExportedTree<'_>>,
) -> Result<(Group<C>, NewMemberInfo), MlsError>
pub fn join( self, welcome: &MlsMessage, tree_data: Option<ExportedTree<'_>>, ) -> Result<(Group<C>, NewMemberInfo), MlsError>
Join a reinitialized group that was created by ReinitClient::commit
.
Auto Trait Implementations§
impl<C> Freeze for ReinitClient<C>where
C: Freeze,
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
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