Frame enum per the RFC inventory; hand-rolled encode/decode with u32 LE length prefix + u8 tag; strings u16-prefixed, payload blobs u32-prefixed; MAX_FRAME_LEN cap (control plane never carries bulk, §5). Streaming decode: Ok(None) = need more bytes, every Err = corruption. postcard confined to encode_payload/decode_payload — the single codec seam (§2); postcard gains the alloc feature for to_allocvec (still no_std-aligned, no default features). DownReason/RejectReason travel as single tag bytes; Down tag 5 is reserved for c11's Disconnected. Tests: per-frame roundtrip, back-to-back frames, golden heartbeat bytes, zero-length payload, every-prefix incomplete, unknown frame/enum tags, length prefix lying long (with and without bytes present) and short, truncation mid-string, adversarial lengths (u32::MAX, cap+1, zero), UTF-8 corruption, payload seam roundtrip through a real Send frame.
9 lines
358 B
Rust
9 lines
358 B
Rust
//! RFC 010 — clustering (smarm⇄smarm, explicit remote boundary).
|
|
//!
|
|
//! c1: feature flag + optional deps only. The owned envelope (c2), transport
|
|
//! trait (c3), and everything above them land in later chunks. This module is
|
|
//! intentionally empty so the `cluster` feature's default-build invariance is
|
|
//! reviewable in isolation.
|
|
|
|
pub mod envelope;
|