Searched refs:try_read_from_bytes (Results 1 – 2 of 2) sorted by relevance
| /linux/rust/zerocopy/src/ |
| H A D | lib.rs | 3122 fn try_read_from_bytes(source: &[u8]) -> Result<Self, TryReadError<&[u8], Self>> in try_read_from_bytes() method 7085 assert_eq!(<bool as TryFromBytes>::try_read_from_bytes(&[0]), Ok(false)); in test_try_from_bytes_try_read_from() 7086 assert_eq!(<bool as TryFromBytes>::try_read_from_bytes(&[1]), Ok(true)); in test_try_from_bytes_try_read_from() 7096 <u8 as TryFromBytes>::try_read_from_bytes(&[]), in test_try_from_bytes_try_read_from() 7110 <u8 as TryFromBytes>::try_read_from_bytes(&[0, 0]), in test_try_from_bytes_try_read_from() 7116 <bool as TryFromBytes>::try_read_from_bytes(&[2]), in test_try_from_bytes_try_read_from() 7133 assert_eq!(<AU64 as TryFromBytes>::try_read_from_bytes(&bytes[..8]), Ok(AU64(0))); in test_try_from_bytes_try_read_from() 7134 assert_eq!(<AU64 as TryFromBytes>::try_read_from_bytes(&bytes[1..9]), Ok(AU64(0))); in test_try_from_bytes_try_read_from()
|
| H A D | impls.rs | 1635 Some(T::try_read_from_bytes(bytes).ok()) in test_impls()
|