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
impl Group
Sourcepub fn write_to_storage(&self) -> Result<(), Error>
pub fn write_to_storage(&self) -> Result<(), Error>
Write the current state of the group to storage defined by
[ClientConfig::group_state_storage
]
Sourcepub fn export_tree(&self) -> Result<RatchetTree, Error>
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
.
Sourcepub fn commit(&self) -> Result<CommitOutput, Error>
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.
Sourcepub fn add_members(
&self,
key_packages: Vec<Arc<Message>>,
) -> Result<CommitOutput, Error>
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.
Sourcepub fn propose_add_members(
&self,
key_packages: Vec<Arc<Message>>,
) -> Result<Vec<Arc<Message>>, Error>
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.
Sourcepub fn remove_members(
&self,
signing_identities: &[Arc<SigningIdentity>],
) -> Result<CommitOutput, Error>
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.
Sourcepub fn propose_remove_members(
&self,
signing_identities: &[Arc<SigningIdentity>],
) -> Result<Vec<Arc<Message>>, Error>
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.
Sourcepub fn encrypt_application_message(
&self,
message: &[u8],
) -> Result<Message, Error>
pub fn encrypt_application_message( &self, message: &[u8], ) -> Result<Message, Error>
Encrypt an application message using the current group state.
Sourcepub fn process_incoming_message(
&self,
message: Arc<Message>,
) -> Result<ReceivedMessage, Error>
pub fn process_incoming_message( &self, message: Arc<Message>, ) -> Result<ReceivedMessage, Error>
Process an inbound message for this group.
Trait Implementations§
Source§impl<T> LowerReturn<T> for Group
impl<T> LowerReturn<T> for Group
const TYPE_ID_META: MetadataBuffer
Source§type ReturnType = <Group as FfiConverterArc<UniFfiTag>>::FfiType
type ReturnType = <Group as FfiConverterArc<UniFfiTag>>::FfiType
Source§fn lower_return(obj: Self) -> Result<Self::ReturnType, RustBuffer>
fn lower_return(obj: Self) -> Result<Self::ReturnType, RustBuffer>
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> 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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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