pub fn encode_data(id: u32, payload: &[u8]) -> BytesExpand 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.