pub struct ExternalCommitBuilder<C: ClientConfig> { /* private fields */ }
Expand description
A builder that aids with the construction of an external commit.
Implementations§
Source§impl<C: ClientConfig> ExternalCommitBuilder<C>
impl<C: ClientConfig> ExternalCommitBuilder<C>
Sourcepub fn with_tree_data(self, tree_data: ExportedTree<'static>) -> Self
pub fn with_tree_data(self, tree_data: ExportedTree<'static>) -> Self
Use external tree data if the GroupInfo message does not contain a
RatchetTreeExt
Sourcepub fn with_removal(self, to_remove: u32) -> Self
pub fn with_removal(self, to_remove: u32) -> Self
Propose the removal of an old version of the client as part of the external commit. Only one such proposal is allowed.
Sourcepub fn with_authenticated_data(self, data: Vec<u8>) -> Self
pub fn with_authenticated_data(self, data: Vec<u8>) -> Self
Add plaintext authenticated data to the resulting commit message.
Sourcepub fn with_external_psk(self, psk: ExternalPskId) -> Self
pub fn with_external_psk(self, psk: ExternalPskId) -> Self
Add an external psk to the group as part of the external commit.
Sourcepub fn with_custom_proposal(self, proposal: CustomProposal) -> Self
pub fn with_custom_proposal(self, proposal: CustomProposal) -> Self
Insert a CustomProposal
into the current commit that is being built.
Sourcepub fn with_received_custom_proposal(self, proposal: MlsMessage) -> Self
pub fn with_received_custom_proposal(self, proposal: MlsMessage) -> Self
Insert a CustomProposal
received from a current group member into the current
commit that is being built.
§Warning
The authenticity of the proposal is NOT fully verified. It is only verified the
same way as by ExternalGroup
.
The proposal MUST be an MlsPlaintext, else the Self::build
function will fail.
Sourcepub fn with_leaf_node_extensions(
self,
leaf_node_extensions: ExtensionList,
) -> Self
pub fn with_leaf_node_extensions( self, leaf_node_extensions: ExtensionList, ) -> Self
Change the committer’s leaf node extensions as part of making this commit.
Sourcepub fn commit_time(self, commit_time: MlsTime) -> Self
pub fn commit_time(self, commit_time: MlsTime) -> Self
Add a time to associate with the commit creation.
Sourcepub fn build(
self,
group_info: MlsMessage,
) -> Result<(Group<C>, MlsMessage), MlsError>
pub fn build( self, group_info: MlsMessage, ) -> Result<(Group<C>, MlsMessage), MlsError>
Build the external commit using a GroupInfo message provided by an existing group member.
Auto Trait Implementations§
impl<C> Freeze for ExternalCommitBuilder<C>where
C: Freeze,
impl<C> RefUnwindSafe for ExternalCommitBuilder<C>where
C: RefUnwindSafe,
impl<C> Send for ExternalCommitBuilder<C>
impl<C> Sync for ExternalCommitBuilder<C>
impl<C> Unpin for ExternalCommitBuilder<C>where
C: Unpin,
impl<C> UnwindSafe for ExternalCommitBuilder<C>where
C: 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
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