pub fn from_slice_with_config<T>(b: &[u8], config: &ParserConfig) -> Result<T>where
T: for<'de> Deserialize<'de> + 'static,Expand description
Deserialize YAML from a byte slice with a custom ParserConfig.
§Errors
Error::Deserialize—bis not valid UTF-8.- All variants documented on
from_str_with_config.
§Examples
use noyalib::{from_slice_with_config, ParserConfig};
let cfg = ParserConfig::new();
let n: i32 = from_slice_with_config(b"7", &cfg).unwrap();
assert_eq!(n, 7);