pub fn encode_header(
payload_len: usize,
capacity: usize,
) -> Result<[u8; 4], FramingError>Available on crate feature
embedded only.Expand description
Encode the big-endian length prefix for an outbound frame of payload_len
bytes, validating it fits a receiver buffer of capacity bytes.