Skip to main content

encode_bytes

Function encode_bytes 

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