from_mut_slice

Function from_mut_slice 

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

Deserialize an instance of type T from a mutable slice of bytes of JSON text.

Byte arrays deserialized from a string retain the original content after unescaping all \ tokens. The content of such a byte array is not UTF-8 validated.

The provided slice must be writable so the deserializer can unescape strings and parse bytes from arrays or strings in-place.

NOTE: Assume the original slice content will be modified!

Any &str or &[u8] in the returned type will contain references to the provided slice.