pub fn deserialize_string<T: TryFrom<String>>(
buffer: &mut Vec<u8>,
) -> Result<T, DeserializationError>Expand description
Removes the next string value from the buffer.
ยงExamples
let mut buffer = [12, 0, 0, 0, 0, 0, 0, 0, 72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33].to_vec();
let value = blt_utils::deserialize_string::<String>(&mut buffer)?;
assert_eq!(value, String::from("Hello World!"));