Skip to main content

peat_lite/protocol/
mod.rs

1//! Peat-Lite Wire Protocol
2//!
3//! Single source of truth for the Peat-Lite binary protocol (ADR-035).
4//! This module is `no_std`-compatible and has zero additional dependencies,
5//! so it can be consumed by both embedded (`peat-lite`) and hosted (`peat-mesh`) code.
6
7pub mod capabilities;
8pub mod constants;
9pub mod crdt_type;
10pub mod document;
11pub mod error;
12pub mod header;
13pub mod message_type;
14pub mod ota;
15pub mod ttl;
16
17pub use capabilities::NodeCapabilities;
18pub use constants::*;
19pub use crdt_type::CrdtType;
20pub use document::{
21    DocumentRef, DOC_FLAG_ENCRYPTED, DOC_FLAG_TOMBSTONE, MAX_BODY_LEN, MAX_COLLECTION_LEN,
22    MAX_DOC_ID_LEN,
23};
24pub use error::MessageError;
25pub use header::{decode_header, encode_header, Header};
26pub use message_type::MessageType;
27pub use ttl::{append_ttl, default_ttl_for_crdt, strip_ttl};