Skip to main content

encode

Function encode 

Source
pub fn encode(frame: &Frame, out: &mut Vec<u8>) -> Result<(), FrameError>
Expand description

Encode one frame, appending to out.

Returns Err(PayloadTooLarge) if the payload exceeds MAX_PAYLOAD or does not fit in a u32 length prefix. On error, out is left unmodified.