pub struct ProcessedWelcome { /* private fields */ }Expand description
A Welcome message that has been processed but not staged yet.
This may be used in order to retrieve information from the Welcome about
the ratchet tree and PSKs.
Use into_staged_welcome to stage it into a StagedWelcome.
Implementations§
Source§impl ProcessedWelcome
impl ProcessedWelcome
Sourcepub fn new_from_welcome<Provider: OpenMlsProvider>(
provider: &Provider,
mls_group_config: &MlsGroupJoinConfig,
welcome: Welcome,
) -> Result<Self, WelcomeError<Provider::StorageError>>
pub fn new_from_welcome<Provider: OpenMlsProvider>( provider: &Provider, mls_group_config: &MlsGroupJoinConfig, welcome: Welcome, ) -> Result<Self, WelcomeError<Provider::StorageError>>
Creates a new processed Welcome message , which can be
inspected before creating a StagedWelcome.
This does not require a ratchet tree yet.
Sourcepub fn unverified_group_info(&self) -> &VerifiableGroupInfo
pub fn unverified_group_info(&self) -> &VerifiableGroupInfo
Get a reference to the GroupInfo in this Welcome message.
NOTE: The group info contains unverified values. Use with caution.
Sourcepub fn psks(&self) -> &[PreSharedKeyId]
pub fn psks(&self) -> &[PreSharedKeyId]
Get a reference to the PSKs in this Welcome message.
NOTE: The group info contains unverified values. Use with caution.
Sourcepub fn into_staged_welcome<Provider: OpenMlsProvider>(
self,
provider: &Provider,
ratchet_tree: Option<RatchetTreeIn>,
) -> Result<StagedWelcome, WelcomeError<Provider::StorageError>>
pub fn into_staged_welcome<Provider: OpenMlsProvider>( self, provider: &Provider, ratchet_tree: Option<RatchetTreeIn>, ) -> Result<StagedWelcome, WelcomeError<Provider::StorageError>>
Consume the ProcessedWelcome and combine it with the ratchet tree into
a StagedWelcome.
Sourcepub fn export_secret<CryptoProvider: OpenMlsCrypto>(
&self,
crypto: &CryptoProvider,
label: &str,
context: &[u8],
key_length: usize,
) -> Result<Vec<u8>, ExportSecretError>
pub fn export_secret<CryptoProvider: OpenMlsCrypto>( &self, crypto: &CryptoProvider, label: &str, context: &[u8], key_length: usize, ) -> Result<Vec<u8>, ExportSecretError>
Exports a secret from the epoch of the group that is joined
using this ProcessedWelcome.
Returns ExportSecretError::KeyLengthTooLong if the requested
key length is too long.
Sourcepub fn own_key_package(&self) -> Option<&KeyPackage>
pub fn own_key_package(&self) -> Option<&KeyPackage>
Retrieve a reference to the own KeyPackage that was retrieved from local storage as
part of Welcome processing, and is used to build the group
Auto Trait Implementations§
impl Freeze for ProcessedWelcome
impl RefUnwindSafe for ProcessedWelcome
impl Send for ProcessedWelcome
impl Sync for ProcessedWelcome
impl Unpin for ProcessedWelcome
impl UnsafeUnpin for ProcessedWelcome
impl UnwindSafe for ProcessedWelcome
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
§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