Skip to main content

unpack

Function unpack 

Source
pub fn unpack<T: Decode>(
    buf: &mut BytesMut,
) -> Result<T, <T::Decoder as Decoder>::Error>
Expand description

Unpack a Decode from a byte buffer buf produced by pack or pack_ready.

This function returns an error if buf contains pending asynchronous values or if buf is not fully consumed.

If this function returns an error, contents of buf are undefined.