decode_from_slice

Function decode_from_slice 

Source
pub fn decode_from_slice<T>(
    bytes: &[u8],
) -> Result<T, <T::Decoder as Decoder>::Error>
where T: Decodable,
Expand description

Decodes an object from a byte slice.

ยงErrors

Returns an error if the decoder encounters an error while parsing the data, including insufficient data.