Function plain::slice_from_bytes_len
source · pub fn slice_from_bytes_len<T>(bytes: &[u8], len: usize) -> Result<&[T], Error>where
T: Plain,
Expand description
Same as slice_from_bytes()
,
except that it takes explicit length of the result slice.
If the input slice cannot satisfy the length, returns error. The input slice is allowed to be longer than necessary.