Function fourleaf::de::from_slice_copy
[−]
[src]
pub fn from_slice_copy<'a, T: Deserialize<TransparentCursor<&'a [u8]>, Copying>>(
bytes: &'a [u8],
config: &Config
) -> Result<T>
Deserialises an instance of T
from the given byte slice.
Byte arrays will be copied into new buffers independent of bytes
. Use
from_slice_borrow
to instead borrow from bytes
.
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.