Skip to main content

encode_data

Function encode_data 

Source
pub fn encode_data(id: u32, payload: &[u8]) -> Bytes
Expand description

Frame a freshly-read chunk. Takes a slice rather than Frame::Data because this is the hot path — going through the enum would buy an extra copy of every byte the database ever sends.