pub struct PendingBranchWelcome { /* private fields */ }Expand description
A subgroup-branch Welcome whose GroupSecrets have been decrypted but not
yet staged.
This lets a receiver read which parent group and epoch the branch derives
from before committing to a BranchInfo.
The decrypted state is carried here and reused when finishing the join.
Create it with StagedWelcome::process_branch_welcome, read the parent
reference with Self::parent, then finish with Self::build_from_branch.
Implementations§
Source§impl PendingBranchWelcome
impl PendingBranchWelcome
Sourcepub fn parent(&self) -> Option<(GroupId, GroupEpoch)>
pub fn parent(&self) -> Option<(GroupId, GroupEpoch)>
The parent group and epoch this branch derives from, read from the branch
resumption PSK carried in the Welcome.
Use this to select the BranchInfo exported from the matching parent
epoch before calling Self::build_from_branch.
Returns None if the Welcome carries no branch resumption PSK, i.e. it
is not a subgroup-branch welcome.
Sourcepub fn build_from_branch<'a, Provider: OpenMlsProvider>(
self,
provider: &'a Provider,
branch_info: BranchInfo,
) -> Result<JoinBuilder<'a, Provider>, WelcomeError<Provider::StorageError>>
pub fn build_from_branch<'a, Provider: OpenMlsProvider>( self, provider: &'a Provider, branch_info: BranchInfo, ) -> Result<JoinBuilder<'a, Provider>, WelcomeError<Provider::StorageError>>
Finish the subgroup-branch join with the selected BranchInfo, reusing
the already-decrypted state (no second decrypt of the Welcome).
The branch PSK’s parent reference is checked against branch_info (see
StagedWelcome::build_from_branch); a branch_info from the wrong
parent epoch fails with WelcomeError::SubgroupParentMismatch. The
remaining receiver checks run when JoinBuilder::build is called.
Auto Trait Implementations§
impl Freeze for PendingBranchWelcome
impl RefUnwindSafe for PendingBranchWelcome
impl Send for PendingBranchWelcome
impl Sync for PendingBranchWelcome
impl Unpin for PendingBranchWelcome
impl UnsafeUnpin for PendingBranchWelcome
impl UnwindSafe for PendingBranchWelcome
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