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 build_from_welcome<'a, Provider: OpenMlsProvider>(
provider: &'a Provider,
mls_group_config: &MlsGroupJoinConfig,
welcome: Welcome,
) -> Result<JoinBuilder<'a, Provider>, WelcomeError<Provider::StorageError>>
pub fn build_from_welcome<'a, Provider: OpenMlsProvider>( provider: &'a Provider, mls_group_config: &MlsGroupJoinConfig, welcome: Welcome, ) -> Result<JoinBuilder<'a, Provider>, WelcomeError<Provider::StorageError>>
Similar to StagedWelcome::new_from_welcome but as a builder.
The builder allows to set the ratchet tree, skip leaf node lifetime
validation, and get the ProcessedWelcome for inspection before staging.
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 Members of this welcome’s PublicGroup.
Sourcepub fn application_export_secret(&self) -> &ApplicationExportSecret
Available on crate feature extensions-draft-08 only.
pub fn application_export_secret(&self) -> &ApplicationExportSecret
extensions-draft-08 only.Get the ApplicationExportSecret of this welcome.
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
§impl<T> Classify for T
impl<T> Classify for T
type Classified = T
fn classify(self) -> T
§impl<T> Declassify for T
impl<T> Declassify for T
type Declassified = T
fn declassify(self) -> T
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