Struct Group

Source
pub struct Group { /* private fields */ }
Expand description

An MLS end-to-end encrypted group.

The group is used to send and process incoming messages and to add/remove users.

See mls_rs::Group for details.

Implementations§

Source§

impl Group

Source

pub fn write_to_storage(&self) -> Result<(), Error>

Write the current state of the group to storage defined by [ClientConfig::group_state_storage]

Source

pub fn export_tree(&self) -> Result<RatchetTree, Error>

Export the current epoch’s ratchet tree in serialized format.

This function is used to provide the current group tree to new members when use_ratchet_tree_extension is set to false in ClientConfig.

Source

pub fn commit(&self) -> Result<CommitOutput, Error>

Perform a commit of received proposals (or an empty commit).

TODO: ensure path_required is always set in MlsRules::commit_options.

Returns the resulting commit message. See mls_rs::Group::commit for details.

Source

pub fn add_members( &self, key_packages: Vec<Arc<Message>>, ) -> Result<CommitOutput, Error>

Commit the addition of one or more members.

The members are representated by key packages. The result is the welcome messages to send to the new members.

See mls_rs::group::CommitBuilder::add_member for details.

Source

pub fn propose_add_members( &self, key_packages: Vec<Arc<Message>>, ) -> Result<Vec<Arc<Message>>, Error>

Propose to add one or more members to this group.

The members are representated by key packages. The result is the proposal messages to send to the group.

See mls_rs::Group::propose_add for details.

Source

pub fn remove_members( &self, signing_identities: &[Arc<SigningIdentity>], ) -> Result<CommitOutput, Error>

Propose and commit the removal of one or more members.

The members are representated by their signing identities.

See mls_rs::group::CommitBuilder::remove_member for details.

Source

pub fn propose_remove_members( &self, signing_identities: &[Arc<SigningIdentity>], ) -> Result<Vec<Arc<Message>>, Error>

Propose to remove one or more members from this group.

The members are representated by their signing identities. The result is the proposal messages to send to the group.

See mls_rs::group::Group::propose_remove for details.

Source

pub fn encrypt_application_message( &self, message: &[u8], ) -> Result<Message, Error>

Encrypt an application message using the current group state.

Source

pub fn process_incoming_message( &self, message: Arc<Message>, ) -> Result<ReceivedMessage, Error>

Process an inbound message for this group.

Trait Implementations§

Source§

impl Clone for Group

Source§

fn clone(&self) -> Group

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T> LiftRef<T> for Group

Source§

impl<T> LowerReturn<T> for Group

Source§

const TYPE_ID_META: MetadataBuffer

Source§

type ReturnType = <Group as FfiConverterArc<UniFfiTag>>::FfiType

The type that should be returned by scaffolding functions for this type. Read more
Source§

fn lower_return(obj: Self) -> Result<Self::ReturnType, RustBuffer>

Lower this value for scaffolding function return Read more
Source§

fn handle_failed_lift(arg_name: &str, e: Error) -> Self

If possible, get a serialized error for failed argument lifts Read more

Auto Trait Implementations§

§

impl Freeze for Group

§

impl RefUnwindSafe for Group

§

impl Send for Group

§

impl Sync for Group

§

impl Unpin for Group

§

impl UnwindSafe for Group

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 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.