pub struct StagedWelcome { /* private fields */ }
Expand description
A StagedWelcome
can be inspected and then turned into a MlsGroup
.
This allows checking who authored the Welcome message.
Implementations§
Source§impl StagedWelcome
impl StagedWelcome
Sourcepub fn new_from_welcome<Provider: OpenMlsProvider>(
provider: &Provider,
mls_group_config: &MlsGroupJoinConfig,
welcome: Welcome,
ratchet_tree: Option<RatchetTreeIn>,
) -> Result<Self, WelcomeError<Provider::StorageError>>
pub fn new_from_welcome<Provider: OpenMlsProvider>( provider: &Provider, mls_group_config: &MlsGroupJoinConfig, welcome: Welcome, ratchet_tree: Option<RatchetTreeIn>, ) -> Result<Self, WelcomeError<Provider::StorageError>>
Creates a new staged welcome from a Welcome
message. Returns an error
(WelcomeError::NoMatchingKeyPackage
) if no KeyPackage
can be found.
Note: calling this function will consume the key material for decrypting the Welcome
message, even if the caller does not turn the StagedWelcome
into an MlsGroup
.
Sourcepub fn welcome_sender_index(&self) -> LeafNodeIndex
pub fn welcome_sender_index(&self) -> LeafNodeIndex
Returns the LeafNodeIndex
of the group member that authored the Welcome
message.
Sourcepub fn welcome_sender(&self) -> Result<&LeafNode, LibraryError>
pub fn welcome_sender(&self) -> Result<&LeafNode, LibraryError>
Sourcepub fn group_context(&self) -> &GroupContext
pub fn group_context(&self) -> &GroupContext
Get the GroupContext
of this welcome’s PublicGroup
.
Sourcepub fn members(&self) -> impl Iterator<Item = Member> + '_
pub fn members(&self) -> impl Iterator<Item = Member> + '_
Get an iterator over all Member
s of this welcome’s PublicGroup
.
Sourcepub fn into_group<Provider: OpenMlsProvider>(
self,
provider: &Provider,
) -> Result<MlsGroup, WelcomeError<Provider::StorageError>>
pub fn into_group<Provider: OpenMlsProvider>( self, provider: &Provider, ) -> Result<MlsGroup, WelcomeError<Provider::StorageError>>
Consumes the StagedWelcome
and returns the respective MlsGroup
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StagedWelcome
impl RefUnwindSafe for StagedWelcome
impl Send for StagedWelcome
impl Sync for StagedWelcome
impl Unpin for StagedWelcome
impl UnwindSafe for StagedWelcome
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