Function encode_bytes

Source
pub fn encode_bytes(
    buf: &mut [u8],
    frame: &BytesFrame,
    int_as_blobstring: bool,
) -> Result<usize, RedisProtocolError>
Available on crate features resp3 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.