[][src]Function serde_lexpr::from_slice

pub fn from_slice<T>(s: &[u8]) -> Result<T> where
    T: DeserializeOwned

Deserialize an instance of type T from an S-expression byte slice, using the default parser options.

use serde_lexpr::from_slice;

let v: Vec<u32> = from_slice(b"(1 2 3)").unwrap();
assert_eq!(v, vec![1, 2, 3]);