pub struct ProtocolStateMachine {
pub epoch: u64,
pub state: ProtocolState,
pub schema_version: u8,
}Expand description
State machine for managing MLS protocol state
Fields§
§epoch: u64Current epoch number
state: ProtocolStateCurrent state
schema_version: u8Schema version for forward compatibility
Implementations§
Source§impl ProtocolStateMachine
impl ProtocolStateMachine
Sourcepub fn start_creation(&mut self) -> Result<()>
pub fn start_creation(&mut self) -> Result<()>
Transition to creating state
Sourcepub fn start_update(&mut self) -> Result<()>
pub fn start_update(&mut self) -> Result<()>
Start an update operation
Sourcepub fn complete_update(&mut self) -> Result<()>
pub fn complete_update(&mut self) -> Result<()>
Complete an update operation
Sourcepub fn state(&self) -> &ProtocolState
pub fn state(&self) -> &ProtocolState
Get current state
Sourcepub fn is_terminated(&self) -> bool
pub fn is_terminated(&self) -> bool
Check if group is terminated
Trait Implementations§
Source§impl Clone for ProtocolStateMachine
impl Clone for ProtocolStateMachine
Source§impl Debug for ProtocolStateMachine
impl Debug for ProtocolStateMachine
Source§impl<'de> Deserialize<'de> for ProtocolStateMachine
impl<'de> Deserialize<'de> for ProtocolStateMachine
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
Auto Trait Implementations§
impl Freeze for ProtocolStateMachine
impl RefUnwindSafe for ProtocolStateMachine
impl Send for ProtocolStateMachine
impl Sync for ProtocolStateMachine
impl Unpin for ProtocolStateMachine
impl UnsafeUnpin for ProtocolStateMachine
impl UnwindSafe for ProtocolStateMachine
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