Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Buffer sizing guide

The rule table is Buffer sizing: compute_length_with_header for a fixed message, the staged *EncodedLength builder when the message has groups or var-data, and no guessed buffer.

A fixed message is a stack array of the length that page names:

#![allow(unused)]
fn main() {
  let mut buf = [0u8; HeartbeatEncoder::compute_length_with_header()];
}