Skip to main content

encode_frame

Function encode_frame 

Source
pub fn encode_frame<T: Serialize>(msg: &T) -> Result<Vec<u8>, Error>
Expand description

Encode a message into a length-prefixed JSON frame.

Frame format: [4-byte big-endian u32 length][JSON payload]