pub fn encode_bytes(
buf: &mut [u8],
frame: &BytesFrame,
int_as_bulkstring: bool,
) -> Result<usize, RedisProtocolError>Available on crate features
resp2 and bytes only.Expand description
Attempt to encode a frame into buf.
The caller is responsible for extending buf if a BufferTooSmall error is returned.
Returns the number of bytes encoded.