pub struct JoinBuilder<'a, Provider: OpenMlsProvider> { /* private fields */ }Expand description
Builder for joining a group.
Create this with StagedWelcome::build_from_welcome.
Implementations§
Source§impl<'a, Provider: OpenMlsProvider> JoinBuilder<'a, Provider>
impl<'a, Provider: OpenMlsProvider> JoinBuilder<'a, Provider>
Sourcepub fn new(provider: &'a Provider, processed_welcome: ProcessedWelcome) -> Self
pub fn new(provider: &'a Provider, processed_welcome: ProcessedWelcome) -> Self
Create a new builder for the JoinBuilder.
Sourcepub fn check_members(self, check_members: bool) -> Self
pub fn check_members(self, check_members: bool) -> Self
When joining a subgroup branch or a reinitialized group, controls
whether Self::build checks the new group’s members by credential
equality. Defaults to true.
Note: This is a shortcut for members that are identical if and only if
credentials are identical.
For more complex member equivalence conditions, the application must disable
this and perform the equivalence check itself.
For a subgroup branch, every subgroup member must also be a member of the parent group (receiver check (c)). For a reinit, the new group’s member credentials must be identical to the old group’s.
This has no effect on a regular (non-branch, non-reinit) join.
Sourcepub fn with_ratchet_tree(self, ratchet_tree: RatchetTreeIn) -> Self
pub fn with_ratchet_tree(self, ratchet_tree: RatchetTreeIn) -> Self
The ratchet tree to use for the new group.
Sourcepub fn replace_old_group(self) -> Self
pub fn replace_old_group(self) -> Self
Instruct the builder to replace any existing group with the same ID.
Sourcepub fn skip_lifetime_validation(self) -> Self
pub fn skip_lifetime_validation(self) -> Self
Skip the validation of lifetimes in leaf nodes in the ratchet tree. Note that only the leaf nodes are checked that were never updated.
By default they are validated.
Sourcepub fn processed_welcome(&self) -> &ProcessedWelcome
pub fn processed_welcome(&self) -> &ProcessedWelcome
Get a reference to the ProcessedWelcome.
Use this to inspect the Welcome message before validation.
Sourcepub fn build(
self,
) -> Result<StagedWelcome, WelcomeError<Provider::StorageError>>
pub fn build( self, ) -> Result<StagedWelcome, WelcomeError<Provider::StorageError>>
Build the StagedWelcome.
Auto Trait Implementations§
impl<'a, Provider> Freeze for JoinBuilder<'a, Provider>where
&'a Provider: Freeze,
impl<'a, Provider> RefUnwindSafe for JoinBuilder<'a, Provider>where
&'a Provider: RefUnwindSafe,
impl<'a, Provider> Send for JoinBuilder<'a, Provider>where
&'a Provider: Send,
impl<'a, Provider> Sync for JoinBuilder<'a, Provider>where
&'a Provider: Sync,
impl<'a, Provider> Unpin for JoinBuilder<'a, Provider>where
&'a Provider: Unpin,
impl<'a, Provider> UnsafeUnpin for JoinBuilder<'a, Provider>where
&'a Provider: UnsafeUnpin,
impl<'a, Provider> UnwindSafe for JoinBuilder<'a, Provider>where
&'a Provider: 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
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