pub fn encode_bytes( buf: &mut BytesMut, frame: &Frame, ) -> Result<usize, RedisProtocolError>
Attempt to encode a frame into buf, extending the buffer as needed.
buf
Returns the number of bytes encoded.