Struct ExternalCommitBuilder

Source
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>

Source

pub fn with_tree_data(self, tree_data: ExportedTree<'static>) -> Self

Use external tree data if the GroupInfo message does not contain a RatchetTreeExt

Source

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.

Source

pub fn with_authenticated_data(self, data: Vec<u8>) -> Self

Add plaintext authenticated data to the resulting commit message.

Source

pub fn with_external_psk(self, psk: ExternalPskId) -> Self

Add an external psk to the group as part of the external commit.

Source

pub fn with_custom_proposal(self, proposal: CustomProposal) -> Self

Insert a CustomProposal into the current commit that is being built.

Source

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.

Source

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.

Source

pub fn commit_time(self, commit_time: MlsTime) -> Self

Add a time to associate with the commit creation.

Source

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§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.