Skip to main content

encode_to_buf

Function encode_to_buf 

Source
pub fn encode_to_buf(msg: &Message, buf: &mut Vec<u8>) -> ProtocolResult<()>
Expand description

Encodes a message to a byte buffer using the length-prefixed frame format.

Frame format: [len: u32 BE][id: u32 BE][flags: u8][CBOR(v, t, p)]