pub fn encode(
buf: &mut [u8],
offset: usize,
frame: &Frame,
) -> Result<usize, RedisProtocolError>
Expand description
Attempt to encode a frame into buf
, assuming a starting offset of 0.
The caller is responsible for extending the buffer if a RedisProtocolErrorKind::BufferTooSmall
is returned.