Function risc0_zkvm::serde::from_slice

source ·
pub fn from_slice<T: DeserializeOwned, P: Pod>(slice: &[P]) -> Result<T>
Expand description

Deserialize a slice into the specified type.

Deserialize slice into type T. Returns an Err if deserialization isn’t possible, such as if slice is not the serialized form of an object of type T.