pub fn try_from_slice_unchecked<T>(data: &[u8]) -> Result<T, Error>where
T: BorshDeserialize,
👎Deprecated since 1.17.0: Please use
v0_10::try_from_slice_unchecked
insteadExpand description
Deserializes without checking that the entire slice has been consumed
Normally, try_from_slice
checks the length of the final slice to ensure
that the deserialization uses up all of the bytes in the slice.
Note that there is a potential issue with this function. Any buffer greater than or equal to the expected size will properly deserialize. For example, if the user passes a buffer destined for a different type, the error won’t get caught as easily.