pub fn from_slice<'a, T>(buffer: &'a [u8]) -> Result<T>where
    T: Deserialize<'a>,