serde_cbor::de

Function from_mut_slice

Source
pub fn from_mut_slice<'a, T>(slice: &'a mut [u8]) -> Result<T>
where T: Deserialize<'a>,
Expand description

Decode a value from CBOR data in a mutable slice.

This can be used in analogy to from_slice. Unlike from_slice, this will use the slice’s mutability to rearrange data in it in order to resolve indefinite byte or text strings without resorting to allocations.