Skip to main content

GroupManager

Struct GroupManager 

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

Group manager for simplified API

Implementations§

Source§

impl GroupManager

Source

pub fn new() -> Self

Create a new group manager

Source

pub async fn group_new(&self, members: &[Identity]) -> Result<GroupId>

Create a new group with initial members

Source

pub async fn group_new_with_config( &self, members: &[Identity], config: GroupConfig, ) -> Result<GroupId>

Create a new group with explicit configuration (including cipher suite)

Source

pub async fn add_member( &self, group_id: &GroupId, id: Identity, ) -> Result<Commit>

Add a member to the group

Source

pub async fn remove_member( &self, group_id: &GroupId, id: Identity, ) -> Result<Commit>

Remove a member from the group

Source

pub fn send(&self, group_id: &GroupId, app_data: &[u8]) -> Result<Ciphertext>

Send an encrypted message to the group

Source

pub fn recv( &self, group_id: &GroupId, ciphertext: &Ciphertext, ) -> Result<Vec<u8>>

Receive and decrypt a message from the group

Trait Implementations§

Source§

impl Debug for GroupManager

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for GroupManager

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

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> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V