Function hcl::from_slice

source ·
pub fn from_slice<'de, T>(buf: &'de [u8]) -> Result<T>where
    T: Deserialize<'de>,
Expand description

Deserialize an instance of type T from a byte slice.

See the documentation of from_str for more information.

Errors

This functions fails with an error if buf does not contain valid UTF-8 or if the data does not match the structure of T.