pub struct GroupConfig {
pub protocol_version: u16,
pub cipher_suite: CipherSuiteId,
pub max_members: Option<u32>,
pub lifetime: Option<u64>,
pub max_epoch_age_millis: u64,
pub max_messages_per_epoch: u64,
pub schema_version: u8,
}Expand description
Configuration for an MLS group
Fields§
§protocol_version: u16Protocol version
cipher_suite: CipherSuiteIdCipher suite identifier
max_members: Option<u32>Maximum number of members
lifetime: Option<u64>Group lifetime in seconds
max_epoch_age_millis: u64Maximum epoch age in milliseconds (SPEC-2 §3: default 24 hours)
max_messages_per_epoch: u64Maximum messages per epoch (SPEC-2 §3: default 10,000)
schema_version: u8Schema version for forward compatibility
Implementations§
Source§impl GroupConfig
impl GroupConfig
Sourcepub fn new(protocol_version: u16, cipher_suite: CipherSuiteId) -> Self
pub fn new(protocol_version: u16, cipher_suite: CipherSuiteId) -> Self
Create a new group configuration
Sourcepub fn with_cipher_suite(self, cipher_suite: CipherSuiteId) -> Self
pub fn with_cipher_suite(self, cipher_suite: CipherSuiteId) -> Self
Set cipher suite identifier
Sourcepub fn with_max_members(self, max_members: u32) -> Self
pub fn with_max_members(self, max_members: u32) -> Self
Set maximum number of members
Sourcepub fn with_lifetime(self, lifetime: u64) -> Self
pub fn with_lifetime(self, lifetime: u64) -> Self
Set group lifetime
Sourcepub fn with_max_epoch_age(self, duration: Duration) -> Self
pub fn with_max_epoch_age(self, duration: Duration) -> Self
Set maximum epoch age (SPEC-2 §3 requirement)
Sourcepub fn with_max_messages_per_epoch(self, count: u64) -> Self
pub fn with_max_messages_per_epoch(self, count: u64) -> Self
Set maximum messages per epoch (SPEC-2 §3 requirement)
Sourcepub fn max_epoch_age(&self) -> Duration
pub fn max_epoch_age(&self) -> Duration
Get maximum epoch age as Duration
Sourcepub fn max_messages_per_epoch(&self) -> u64
pub fn max_messages_per_epoch(&self) -> u64
Get maximum messages per epoch
Trait Implementations§
Source§impl Clone for GroupConfig
impl Clone for GroupConfig
Source§fn clone(&self) -> GroupConfig
fn clone(&self) -> GroupConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GroupConfig
impl Debug for GroupConfig
Source§impl Default for GroupConfig
impl Default for GroupConfig
Source§impl<'de> Deserialize<'de> for GroupConfig
impl<'de> Deserialize<'de> for GroupConfig
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for GroupConfig
impl PartialEq for GroupConfig
Source§impl Serialize for GroupConfig
impl Serialize for GroupConfig
impl Eq for GroupConfig
impl StructuralPartialEq for GroupConfig
Auto Trait Implementations§
impl Freeze for GroupConfig
impl RefUnwindSafe for GroupConfig
impl Send for GroupConfig
impl Sync for GroupConfig
impl Unpin for GroupConfig
impl UnwindSafe for GroupConfig
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