Function switchboard_solana::prelude::borsh::try_from_slice_with_schema
pub fn try_from_slice_with_schema<T>(v: &[u8]) -> Result<T, Error>where
T: BorshDeserialize + BorshSchema,
Expand description
Deserialize this instance from a slice of bytes, but assume that at the beginning we have bytes describing the schema of the type. We deserialize this schema and verify that it is correct.