fmf_contract/limits.rs
1//! Contractual bounds (docs/ARCHITECTURE.md). These are protocol facts both
2//! sides must agree on, not tunables.
3
4/// Hard cap on a single pipe frame's payload; announcing more is a protocol
5/// violation (connection dropped).
6pub const MAX_PAYLOAD_LEN: u32 = 16 * 1024 * 1024;
7
8/// Per-connection result-handle registry cap; beyond it the least recently
9/// used handle is evicted (its pages answer STALE with an "evicted" detail).
10pub const MAX_RESULTS_PER_CONN: usize = 64;
11
12/// Per-subscriber bounded event queue; overflow drops the oldest event
13/// (counted + warned — a slow reader never blocks volume threads).
14pub const EVENT_QUEUE_CAP: usize = 256;
15
16/// The client's page-fetch granularity (rows per `ResultPage` request and the
17/// UI virtualization page size). The wire itself accepts any count.
18pub const PAGE_ROWS: u32 = 64;