pub struct BranchGroupBuilder { /* private fields */ }Expand description
Builder that creates a fresh sub-group and its branch commit in a single step, as described in RFC 9420 §11.3.
Create this with MlsGroupBuilder::branch.
Implementations§
Source§impl BranchGroupBuilder
impl BranchGroupBuilder
Sourcepub fn propose_group_context_extensions(
self,
extensions: Extensions<GroupContext>,
) -> Self
pub fn propose_group_context_extensions( self, extensions: Extensions<GroupContext>, ) -> Self
Add a GroupContextExtensions proposal
to the branch commit. See
CommitBuilder::propose_group_context_extensions.
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 branch commit. See
CommitBuilder::force_self_update.
Sourcepub fn build_branch<Provider: OpenMlsProvider>(
self,
provider: &Provider,
signer: &impl Signer,
credential_with_key: CredentialWithKey,
new_members: Vec<KeyPackage>,
) -> Result<(MlsGroup, CommitMessageBundle), BranchError<Provider::StorageError>>
pub fn build_branch<Provider: OpenMlsProvider>( self, provider: &Provider, signer: &impl Signer, credential_with_key: CredentialWithKey, new_members: Vec<KeyPackage>, ) -> Result<(MlsGroup, CommitMessageBundle), BranchError<Provider::StorageError>>
Create the sub-group and the branch commit that adds new_members to it.
This creates a fresh group with the parent’s ciphersuite, adds the branch
resumption PSK (mixing in the parent’s resumption PSK secret), and commits
the additions (plus any extra proposals set via
Self::propose_group_context_extensions / Self::force_self_update).
It returns the new (epoch-0) sub-group and the CommitMessageBundle
carrying the branch 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 BranchGroupBuilder
impl RefUnwindSafe for BranchGroupBuilder
impl Send for BranchGroupBuilder
impl Sync for BranchGroupBuilder
impl Unpin for BranchGroupBuilder
impl UnsafeUnpin for BranchGroupBuilder
impl UnwindSafe for BranchGroupBuilder
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