Searched refs:ref_from_bytes (Results 1 – 4 of 4) sorted by relevance
| /linux/rust/zerocopy/src/ |
| H A D | macros.rs | 1388 SliceDst::<U16, [u8; 2]>::ref_from_bytes(&[0, 1, 2, 3, 4, 5][..]).unwrap(); in test_transmute_ref() 1390 SliceDst::<U16, U16>::ref_from_bytes(&[0, 1, 2, 3, 4, 5][..]).unwrap(); in test_transmute_ref() 1395 SliceDst::<U16, u8>::ref_from_bytes(&[0, 1, 2, 3, 4, 5][..]).unwrap(); in test_transmute_ref() 1403 let slice_of_u16s: &[U16] = <[U16]>::ref_from_bytes(&[0, 1, 2, 3, 4, 5][..]).unwrap(); in test_transmute_ref() 1409 let slice_dst_big = SliceDst::<U32, U16>::ref_from_bytes(bytes).unwrap(); in test_transmute_ref() 1410 let slice_dst_small = SliceDst::<U16, u8>::ref_from_bytes(bytes).unwrap(); in test_transmute_ref() 1520 SliceDst::<U16, [u8; 2]>::ref_from_bytes(&[0, 1, 2, 3, 4, 5][..]).unwrap(); in test_try_transmute_ref() 1522 SliceDst::<U16, U16>::ref_from_bytes(&[0, 1, 2, 3, 4, 5][..]).unwrap(); in test_try_transmute_ref()
|
| H A D | split_at.rs | 972 let dst = SliceDst::<OFFSET>::ref_from_bytes(&arr[..]).unwrap(); in test_split_at() 1017 let dst = SliceDst::ref_from_bytes(arr.as_bytes()).unwrap(); in test_split_at_overlapping() 1060 let packet = Packet::ref_from_bytes(&arr[..]).unwrap(); in test_split_at_via_methods() 1083 let packet = Packet::ref_from_bytes(&arr[..]).unwrap(); in test_split_at_via_unaligned()
|
| H A D | lib.rs | 4155 fn ref_from_bytes(source: &[u8]) -> Result<&Self, CastError<&[u8], Self>> in ref_from_bytes() method 5397 Self::ref_from_bytes(source).ok() in ref_from() 7165 AU64::ref_from_bytes(&buf.t[8..]).unwrap().0.to_ne_bytes(), in test_ref_from_mut_from_bytes() 7198 assert!(AU64::ref_from_bytes(&buf.t[..]).is_err()); in test_ref_from_mut_from_bytes_error() 7200 assert!(<[u8; 8]>::ref_from_bytes(&buf.t[..]).is_err()); in test_ref_from_mut_from_bytes_error() 7205 assert!(AU64::ref_from_bytes(&buf.t[..]).is_err()); in test_ref_from_mut_from_bytes_error() 7207 assert!(<[u8; 8]>::ref_from_bytes(&buf.t[..]).is_err()); in test_ref_from_mut_from_bytes_error() 7220 assert!(AU64::ref_from_bytes(&buf.t[1..]).is_err()); in test_ref_from_mut_from_bytes_error() 7222 assert!(AU64::ref_from_bytes(&buf.t[1..]).is_err()); in test_ref_from_mut_from_bytes_error()
|
| /linux/rust/zerocopy/src/pointer/ |
| H A D | inner.rs | 638 let dst = <[u8]>::ref_from_bytes(&arr[..]).unwrap(); in test_meta() 660 let dst = SliceDst::<OFFSET>::ref_from_bytes(&arr[..]).unwrap(); in test_split_at() 712 let dst = SliceDst::<OFFSET>::ref_from_bytes(&arr[..]).unwrap(); in test_trailing_slice()
|