pub struct GroupStateSnapshot {
pub v: u8,
pub group_id: ConversationId,
pub openmls_storage_version: u16,
pub snapshot_created_at_ms: u64,
pub entries: Vec<GroupSnapshotEntry>,
}Expand description
[CR-7] Portable snapshot of an MLS group’s OpenMLS state.
Produced by [Conversation::export_state_snapshot] on one device, consumed by
[MessagingClient::import_state_snapshot] on another to re-attach to the same
group without re-Welcoming. The receiver MUST be the same user identity (the
linking-flow QR handshake or recovery mnemonic provides that).
What’s in: every OpenMLS storage entry whose key references this group’s
group_id. Trees, contexts, transcript hashes, message secrets, epoch keys —
everything MlsGroup::load needs to reconstruct the live group object.
What’s out: signature keypairs (recovered devices ALWAYS get a fresh signing key per [recovery.md §recovery on a new device]); leaf-keyed encryption keypairs for other leaves (those don’t have the group_id in their key by definition); pending KeyPackages (per-device; receiver generates fresh ones on first publish).
Forward secrecy note: this snapshot exposes the exporter’s view of past epoch
secrets for this group. That’s intentional for the linking + DG-recovery use
cases (same user, trusted handover via QR / mnemonic). It is NOT used for
peer-conversation history transfer — that goes through HPKE-sealed AppEvent
re-shares per umbrella §15.6. Hosts MUST ensure callers of export_state_snapshot
are authenticated to the user’s intent.
Fields§
§v: u8Format version. Bumped on incompatible CBOR-shape changes.
group_id: ConversationIdGroup id this snapshot describes. Sanity-checked on import — passing a snapshot for the wrong group is an error.
openmls_storage_version: u16OpenMLS storage-provider version at export time. Import refuses mismatched versions outright (no automatic forward/back compat).
snapshot_created_at_ms: u64Wall-clock ms at export. Informational; receivers can warn on stale snapshots but the SDK does not act on it.
entries: Vec<GroupSnapshotEntry>(raw_storage_key, raw_storage_value) pairs lifted from the exporter’s
MemoryStorage. The receiver replays them into its own provider via
import_entries.
Implementations§
Trait Implementations§
Source§impl Clone for GroupStateSnapshot
impl Clone for GroupStateSnapshot
Source§fn clone(&self) -> GroupStateSnapshot
fn clone(&self) -> GroupStateSnapshot
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GroupStateSnapshot
impl Debug for GroupStateSnapshot
Source§impl<'de> Deserialize<'de> for GroupStateSnapshot
impl<'de> Deserialize<'de> for GroupStateSnapshot
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>,
Auto Trait Implementations§
impl Freeze for GroupStateSnapshot
impl RefUnwindSafe for GroupStateSnapshot
impl Send for GroupStateSnapshot
impl Sync for GroupStateSnapshot
impl Unpin for GroupStateSnapshot
impl UnsafeUnpin for GroupStateSnapshot
impl UnwindSafe for GroupStateSnapshot
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more