pub enum CloudPacket {
Authenticate {
token: String,
client_id: String,
room_name: String,
room_key: String,
api_key: Option<String>,
client_version: Option<String>,
enc_fp: Option<[u8; 32]>,
enc_cols: Vec<String>,
},
AuthResult {
success: bool,
error: Option<String>,
},
VersionPing {
versions: HashMap<String, i64>,
},
Replication {
msg_id: u128,
collection: String,
ops: Vec<WalOp>,
},
SyncRequest {
collection: String,
},
Heartbeat,
}Variants§
Authenticate
Client -> Server: Initial Auth & Handshake.
api_key / client_version are additive (serde defaults): old
peers omit them and still authenticate against open groups.
enc_fp / enc_cols carry the same capability advertisement as the
mesh SyncCaps packet (see crate::sync_guard): the sender’s key
fingerprint plus the collections it encrypts at rest. Absent on old
peers, which are therefore treated as unverified for encrypted
rooms (fail closed).
Fields
AuthResult
Server -> Client: Handshake Response
VersionPing
Version handshake exchanged symmetrically to catch up on missed deltas
Replication
Direct Replication Batch
SyncRequest
Server Request for full state catchup
Heartbeat
Heartbeat Ping / Pong
Trait Implementations§
Source§impl Clone for CloudPacket
impl Clone for CloudPacket
Source§impl Debug for CloudPacket
impl Debug for CloudPacket
Source§impl<'de> Deserialize<'de> for CloudPacket
impl<'de> Deserialize<'de> for CloudPacket
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 CloudPacket
impl RefUnwindSafe for CloudPacket
impl Send for CloudPacket
impl Sync for CloudPacket
impl Unpin for CloudPacket
impl UnsafeUnpin for CloudPacket
impl UnwindSafe for CloudPacket
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
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> 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> ⓘ
Converts
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> ⓘ
Converts
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