Searched refs:from_prefix (Results 1 – 2 of 2) sorted by relevance
| /linux/rust/zerocopy/src/ |
| H A D | deprecated.rs | 41 Self::from_prefix(bytes).ok() in new_from_prefix() 89 Self::from_prefix(bytes).ok() in new_unaligned_from_prefix()
|
| H A D | ref.rs | 365 pub fn from_prefix(source: B) -> Result<(Ref<B, T>, B), CastError<B, T>> { in from_prefix() function 1099 let (r, suffix) = Ref::<_, AU64>::from_prefix(&mut buf.t[..]).unwrap(); in test_new_aligned_sized() 1154 let (r, suffix) = Ref::<_, AU64>::from_prefix(&mut buf.t[..]).unwrap(); in test_new_oversized() 1183 assert!(Ref::<_, AU64>::from_prefix(&buf.t[..]).is_err()); in test_new_error() 1216 assert!(Ref::<_, AU64>::from_prefix(&buf.t[1..]).is_err()); in test_new_error()
|