Function fourleaf::de::from_slice_borrow [] [src]

pub fn from_slice_borrow<'a, T: Deserialize<TransparentCursor<&'a [u8]>, ZeroCopy>>(
    bytes: &'a [u8],
    config: &Config
) -> Result<T>

Deserialises an instance of T from the given byte slice.

Byte arrays will be borrowed from the underlying reader when the type to be deserialised supports it.

This constructs a Stream with its default properties. Additionally, unconsumed bytes beyond the deserialised value are ignored. If either of these is undesirable, construct a Stream manually with Stream::from_slice and then call one of the from_stream_* methods.