pub async fn read_frame<T: for<'de> Deserialize<'de>, R: AsyncRead + Unpin>(
reader: &mut R,
max: usize,
) -> Result<(T, usize)>Expand description
Read one frame; returns the decoded value and the frame size in
bytes (4 + body — the metrics input, SRV-007). The cap is checked
between reading the prefix and allocating the body (WIRE-020).