pub struct ExternalCommitBuilder { /* private fields */ }Expand description
This is the builder for external commits. It allows you to build an external commit that can be used to join a group externally. Parameters such as optional SelfRemove proposals from other members, the ratchet tree, and the group join configuration can be set in the first builder stage.
The second stage of this builder is a CommitBuilder that can be used to
add one or more PreSharedKeyProposals to the external commit and specify
LeafNodeParameters.
Implementations§
Source§impl ExternalCommitBuilder
impl ExternalCommitBuilder
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new ExternalCommitBuilder with default values.
Sourcepub fn with_proposals(self, proposals: Vec<PublicMessageIn>) -> Self
pub fn with_proposals(self, proposals: Vec<PublicMessageIn>) -> Self
Adds SelfRemove proposals to the external commit. Other proposals or other types of messages are ignored.
Sourcepub fn with_ratchet_tree(self, ratchet_tree: RatchetTreeIn) -> Self
pub fn with_ratchet_tree(self, ratchet_tree: RatchetTreeIn) -> Self
Specifies the ratchet tree to use for the external commit. This is only
used if the ratchet tree is not provided in the VerifiableGroupInfo
extensions. A ratchet tree must be provided, either in the
VerifiableGroupInfo extensions or via this method.
Sourcepub fn with_config(self, config: MlsGroupJoinConfig) -> Self
pub fn with_config(self, config: MlsGroupJoinConfig) -> Self
Specifies the configuration to use for the group built as part of the
external commit. Note that the external commit will always be a
PublicMessage regardless of the wire format policy set in the group
config.
Sourcepub fn with_aad(self, aad: Vec<u8>) -> Self
pub fn with_aad(self, aad: Vec<u8>) -> Self
Specifies additional authenticated data (AAD) to be included in the external commit.
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 build_group<Provider: OpenMlsProvider>(
self,
provider: &Provider,
verifiable_group_info: VerifiableGroupInfo,
credential_with_key: CredentialWithKey,
) -> Result<CommitBuilder<'_, Initial, MlsGroup>, ExternalCommitBuilderError<Provider::StorageError>>
pub fn build_group<Provider: OpenMlsProvider>( self, provider: &Provider, verifiable_group_info: VerifiableGroupInfo, credential_with_key: CredentialWithKey, ) -> Result<CommitBuilder<'_, Initial, MlsGroup>, ExternalCommitBuilderError<Provider::StorageError>>
Build the MlsGroup from the provided VerifiableGroupInfo and
CredentialWithKey.
Returns a CommitBuilder that can be used to further configure the
external commit.
Trait Implementations§
Source§impl Default for ExternalCommitBuilder
impl Default for ExternalCommitBuilder
Source§fn default() -> ExternalCommitBuilder
fn default() -> ExternalCommitBuilder
Auto Trait Implementations§
impl Freeze for ExternalCommitBuilder
impl RefUnwindSafe for ExternalCommitBuilder
impl Send for ExternalCommitBuilder
impl Sync for ExternalCommitBuilder
impl Unpin for ExternalCommitBuilder
impl UnwindSafe for ExternalCommitBuilder
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