pub struct ReInitGroupBuilder { /* private fields */ }Expand description
Builder that creates a freshly reinitialized group and its reinit commit in a single step, as described in RFC 9420 §11.2.
This overrides the group_id, ciphersuite and group_context.extensions of the group_builder with value from the ReInit proposal.
Create this with MlsGroupBuilder::reinit.
Implementations§
Source§impl ReInitGroupBuilder
impl ReInitGroupBuilder
Sourcepub fn force_self_update(self, force_self_update: bool) -> Self
pub fn force_self_update(self, force_self_update: bool) -> Self
Force a self-update (path) in the reinit commit. See
CommitBuilder::force_self_update.
Sourcepub fn build_reinit<Provider: OpenMlsProvider>(
self,
provider: &Provider,
signer: &impl Signer,
credential_with_key: CredentialWithKey,
members: impl IntoIterator<Item = KeyPackage>,
) -> Result<(MlsGroup, CommitMessageBundle), ReInitError<Provider::StorageError>>
pub fn build_reinit<Provider: OpenMlsProvider>( self, provider: &Provider, signer: &impl Signer, credential_with_key: CredentialWithKey, members: impl IntoIterator<Item = KeyPackage>, ) -> Result<(MlsGroup, CommitMessageBundle), ReInitError<Provider::StorageError>>
Create the reinitialized group and a reinit commit that adds members to it.
The application must ensure that members match the members of the predecessor group,
otherwise joiners will reject the Welcome, see also JoinBuilder::check_members.
This creates a fresh group with the ReInit proposal’s group_id, ciphersuite and
group_context.extensions, adds the reinit
resumption PSK (mixing in the old group’s resumption PSK secret), and commits
the additions (plus Self::force_self_update).
It returns the new (epoch-0) group and the CommitMessageBundle
carrying the first commit and Welcome.
The commit is staged but not merged: merge it with
MlsGroup::merge_pending_commit
only once the delivery service has confirmed it.
Auto Trait Implementations§
impl Freeze for ReInitGroupBuilder
impl RefUnwindSafe for ReInitGroupBuilder
impl Send for ReInitGroupBuilder
impl Sync for ReInitGroupBuilder
impl Unpin for ReInitGroupBuilder
impl UnsafeUnpin for ReInitGroupBuilder
impl UnwindSafe for ReInitGroupBuilder
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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