pub async fn decode<T>(buffer: impl AsRef<[u8]>) -> Result<T, Error>where T: Decodable + Default,
Decode from a binary buffer.