pub trait StringByteDecoder<'de>: Sized {
// Required method
fn decode_string_to_bytes(
de: &mut Deserializer<'de, Self>,
) -> Result<&'de [u8]>;
}Expand description
Auxiliary trait for objects implementing string to bytes decoding.
Required Methods§
Sourcefn decode_string_to_bytes(de: &mut Deserializer<'de, Self>) -> Result<&'de [u8]>
fn decode_string_to_bytes(de: &mut Deserializer<'de, Self>) -> Result<&'de [u8]>
Should decode bytes from the JSON string after the opening b'"'
has been consumed and until the closing b'"' is found in the input slice.
A decoded byte slice must fit in place where the encoded string originaly was.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.