Function redis_protocol::encode::encode[][src]

pub fn encode<'a>(
    buf: &'a mut [u8],
    frame: &Frame
) -> Result<usize, RedisProtocolError<'a>>

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.