encode_paging_v2_header

Function encode_paging_v2_header 

Source
pub fn encode_paging_v2_header(
    kind: PagingKind,
    arena_bytes: u64,
    blob_bytes: u64,
) -> [u8; 25]
Expand description

Encode the CLIENT half of the v2 paging handshake header — what EVERY paging client sends first: KV paging, SSM paging (connect_paging), and both RAW one-sided modes (via blob_bytes == 0): [u64 PAGING_MAGIC_V2 LE][u8 kind][u64 arena_bytes LE][u64 blob_bytes LE] — 25 bytes, followed by the unchanged [u8 n_rails] RailSet exchange. Lives in this ONE shared module (beside parse_paging_header, its peer half) so writer and reader can never drift; byte-frozen and golden-pinned in wire_tests.rs.