pub struct AsyncPhalanxGroup { /* private fields */ }Expand description
Async wrapper for PhalanxGroup
Implementations§
Source§impl AsyncPhalanxGroup
impl AsyncPhalanxGroup
Sourcepub fn with_config(identity: Identity, config: GroupConfig) -> Self
pub fn with_config(identity: Identity, config: GroupConfig) -> Self
Create a new async group with custom configuration
Sourcepub async fn join(
identity: Identity,
handshake: HandshakeMessage,
group_key: SymmetricKey,
) -> Result<Self>
pub async fn join( identity: Identity, handshake: HandshakeMessage, group_key: SymmetricKey, ) -> Result<Self>
Join an existing group using a handshake
Sourcepub async fn add_member(
&self,
member_key: PublicKey,
role: MemberRole,
) -> Result<()>
pub async fn add_member( &self, member_key: PublicKey, role: MemberRole, ) -> Result<()>
Add a new member to the group
Sourcepub async fn remove_member(&self, member_id: &[u8; 32]) -> Result<()>
pub async fn remove_member(&self, member_id: &[u8; 32]) -> Result<()>
Remove a member from the group
Sourcepub async fn encrypt_message(
&self,
content: &MessageContent,
) -> Result<GroupMessage>
pub async fn encrypt_message( &self, content: &MessageContent, ) -> Result<GroupMessage>
Encrypt a message for the group
Sourcepub async fn decrypt_message(
&self,
message: &GroupMessage,
) -> Result<MessageContent>
pub async fn decrypt_message( &self, message: &GroupMessage, ) -> Result<MessageContent>
Decrypt a group message
Sourcepub async fn rotate_keys(&self) -> Result<KeyRotationMessage>
pub async fn rotate_keys(&self) -> Result<KeyRotationMessage>
Rotate group encryption keys
Sourcepub async fn needs_key_rotation(&self) -> bool
pub async fn needs_key_rotation(&self) -> bool
Check if key rotation is needed
Sourcepub async fn update_member_activity(&self, member_id: &[u8; 32])
pub async fn update_member_activity(&self, member_id: &[u8; 32])
Update member’s last seen timestamp
Sourcepub async fn set_member_nickname(
&self,
member_id: &[u8; 32],
nickname: Option<String>,
) -> Result<()>
pub async fn set_member_nickname( &self, member_id: &[u8; 32], nickname: Option<String>, ) -> Result<()>
Set member nickname
Sourcepub async fn stats(&self) -> GroupStats
pub async fn stats(&self) -> GroupStats
Get group statistics
Sourcepub async fn create_handshake(&self) -> Result<HandshakeMessage>
pub async fn create_handshake(&self) -> Result<HandshakeMessage>
Create a handshake for joining this group
Sourcepub async fn config(&self) -> GroupConfig
pub async fn config(&self) -> GroupConfig
Get group configuration
Trait Implementations§
Source§impl Clone for AsyncPhalanxGroup
impl Clone for AsyncPhalanxGroup
Auto Trait Implementations§
impl Freeze for AsyncPhalanxGroup
impl !RefUnwindSafe for AsyncPhalanxGroup
impl Send for AsyncPhalanxGroup
impl Sync for AsyncPhalanxGroup
impl Unpin for AsyncPhalanxGroup
impl !UnwindSafe for AsyncPhalanxGroup
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
Mutably borrows from an owned value. Read more