pub struct PeatLiteDocumentFrame {
pub source_node_id: u32,
pub seq_num: u32,
pub flags: u8,
pub collection: String,
pub doc_id: String,
pub timestamp_ms: i64,
pub body: Vec<u8>,
}Expand description
Owned snapshot of a decoded peat-lite Document frame, surfaced via
DataReceivedResult::peat_lite_document when the receive
dispatch successfully decodes a MessageType::Document envelope.
Mirrors the DecodedTranslatorFrame design pattern: defined
unconditionally so the UniFFI binding shape stays stable across
feature combos. Population only happens when the
peat-lite-frame feature is on (the codec dispatcher in
[crate::peat_lite_frame] is feature-gated).
Hosts forward populated entries through their existing
publish-with-origin FFI surface to plug into peat-mesh’s doc
store. The body is opaque bytes — peat-btle does not interpret;
consumers (peat-mesh’s transport::document_codec,
peat-atak-plugin’s marker bridge, M5Stack firmware) own the body
schema.
Fields§
§source_node_id: u32Source node id from the peat-lite header. Polled hosts use this for loop-prevention and dedup tracking.
seq_num: u32Sequence number from the peat-lite header. Polled hosts use this to detect duplicate deliveries.
flags: u8Flags byte from the Document envelope (bit 0 = tombstone).
collection: StringCollection name (UTF-8). Doc-store routing key alongside
doc_id.
doc_id: StringDocument id (UTF-8). Empty signals “publisher-delegated id assignment.”
timestamp_ms: i64Unix epoch milliseconds.
body: Vec<u8>Opaque body bytes (typically JSON-encoded
Document.fields from peat-mesh’s transport::document_codec).
Implementations§
Source§impl PeatLiteDocumentFrame
impl PeatLiteDocumentFrame
Sourcepub fn is_tombstone(&self) -> bool
pub fn is_tombstone(&self) -> bool
Returns true if the deletion-tombstone flag is set.
Trait Implementations§
Source§impl Clone for PeatLiteDocumentFrame
impl Clone for PeatLiteDocumentFrame
Source§fn clone(&self) -> PeatLiteDocumentFrame
fn clone(&self) -> PeatLiteDocumentFrame
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more