#[non_exhaustive]#[repr(u8)]pub enum MessageType {
Show 14 variants
Announce = 1,
Heartbeat = 2,
Data = 3,
Query = 4,
Ack = 5,
Leave = 6,
Document = 7,
OtaOffer = 16,
OtaAccept = 17,
OtaData = 18,
OtaAck = 19,
OtaComplete = 20,
OtaResult = 21,
OtaAbort = 22,
}Expand description
Message types for the gossip protocol.
Marked #[non_exhaustive] so future protocol amendments can add
variants without breaking exhaustive-match consumers in downstream
crates (peat-mesh, peat-btle, peat-atak-plugin). Match arms must
include a _ => fall-through to compile against the latest
peat-lite.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Announce = 1
Announce presence and capabilities.
Heartbeat = 2
Heartbeat / keep-alive.
Data = 3
Data update (CRDT state).
Query = 4
Query for specific state.
Ack = 5
Acknowledge receipt.
Leave = 6
Leave notification.
Document = 7
Universal Document carrier (peat_mesh::Document, transport-agnostic).
Distinct from MessageType::Data’s typed-CRDT-primitive payload —
Document carries an opaque envelope: collection name + doc id +
timestamp + length-prefixed body bytes whose interpretation is owned
by peat-mesh (or any consumer). Adding a new collection on the
network requires zero codec changes downstream of peat-lite.
See protocol::document for the wire layout.
OtaOffer = 16
OTA firmware offer (Full -> Lite).
OtaAccept = 17
OTA accept (Lite -> Full).
OtaData = 18
OTA data chunk (Full -> Lite).
OtaAck = 19
OTA chunk acknowledgement (Lite -> Full).
OtaComplete = 20
OTA transfer complete (Full -> Lite).
OtaResult = 21
OTA result (Lite -> Full).
OtaAbort = 22
OTA abort (either direction).
Implementations§
Trait Implementations§
Source§impl Clone for MessageType
impl Clone for MessageType
Source§fn clone(&self) -> MessageType
fn clone(&self) -> MessageType
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more