pub struct GroupJoinInfo {
pub channel_id: String,
pub group_info: GroupInfo,
pub encryption_key: [u8; 32],
pub key_info: GroupKeyInfo,
pub relay_endpoints: Vec<RelayEndpoint>,
pub invitation_metadata: Vec<Metadata>,
}Expand description
Complete information needed for a participant to join an encrypted group
This structure contains everything a new participant needs to join and participate in an encrypted group, including the group metadata, encryption keys, channel information, and relay endpoints for communication.
Fields§
§channel_id: StringHash ID of the initial CreateGroup message
This serves as the unique channel ID for the group and is derived from the Blake3 hash of the initial CreateGroup message.
group_info: GroupInfoGroup information from the CreateGroup event
Contains the group name, description, metadata, settings, and other information that was specified when the group was created.
encryption_key: [u8; 32]Encryption key for the group
The shared AES key used to encrypt and decrypt group messages. This is the raw key bytes that participants need to encrypt/decrypt group communications.
key_info: GroupKeyInfoKey derivation information
Contains metadata about how the encryption key was derived, including key ID and derivation parameters. This helps participants identify and manage the correct encryption keys.
relay_endpoints: Vec<RelayEndpoint>List of relay endpoints (ordered by priority)
Contains the relay servers that participants can use to communicate within the group. The list is ordered by priority, with the first endpoint being the preferred relay. Participants should try relays in order until they find one that works.
invitation_metadata: Vec<Metadata>Optional invitation metadata
Additional information about the invitation, such as who sent it, when it was created, expiration time, or invitation-specific settings.
Implementations§
Source§impl GroupJoinInfo
impl GroupJoinInfo
Sourcepub fn new(
channel_id: String,
group_info: GroupInfo,
encryption_key: [u8; 32],
key_info: GroupKeyInfo,
relay_endpoints: Vec<RelayEndpoint>,
) -> Self
pub fn new( channel_id: String, group_info: GroupInfo, encryption_key: [u8; 32], key_info: GroupKeyInfo, relay_endpoints: Vec<RelayEndpoint>, ) -> Self
Create new group join information
Sourcepub fn with_invitation_metadata(self, metadata: Metadata) -> Self
pub fn with_invitation_metadata(self, metadata: Metadata) -> Self
Add metadata to the invitation
Sourcepub fn add_relay(self, endpoint: RelayEndpoint) -> Self
pub fn add_relay(self, endpoint: RelayEndpoint) -> Self
Add a relay endpoint to the list
Sourcepub fn primary_relay(&self) -> Option<&RelayEndpoint>
pub fn primary_relay(&self) -> Option<&RelayEndpoint>
Get the primary (first priority) relay endpoint
Sourcepub fn relays_by_priority(&self) -> &[RelayEndpoint]
pub fn relays_by_priority(&self) -> &[RelayEndpoint]
Get all relay endpoints ordered by priority
Sourcepub fn has_relays(&self) -> bool
pub fn has_relays(&self) -> bool
Check if this invitation has any relay endpoints
Trait Implementations§
Source§impl Clone for GroupJoinInfo
impl Clone for GroupJoinInfo
Source§fn clone(&self) -> GroupJoinInfo
fn clone(&self) -> GroupJoinInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GroupJoinInfo
impl Debug for GroupJoinInfo
Source§impl<'de> Deserialize<'de> for GroupJoinInfo
impl<'de> Deserialize<'de> for GroupJoinInfo
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for GroupJoinInfo
impl PartialEq for GroupJoinInfo
Source§impl Serialize for GroupJoinInfo
impl Serialize for GroupJoinInfo
impl Eq for GroupJoinInfo
impl StructuralPartialEq for GroupJoinInfo
Auto Trait Implementations§
impl Freeze for GroupJoinInfo
impl RefUnwindSafe for GroupJoinInfo
impl Send for GroupJoinInfo
impl Sync for GroupJoinInfo
impl Unpin for GroupJoinInfo
impl UnwindSafe for GroupJoinInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
§impl<T> Classify for T
impl<T> Classify for T
type Classified = T
fn classify(self) -> T
§impl<T> Classify for T
impl<T> Classify for T
type Classified = T
fn classify(self) -> T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Declassify for T
impl<T> Declassify for T
type Declassified = T
fn declassify(self) -> T
§impl<T> Declassify for T
impl<T> Declassify for T
type Declassified = T
fn declassify(self) -> T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.