Function from_mut_slice_with_decoder

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

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

P must implement StringByteDecoder and determines how strings are converted to bytes.

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.