Lines Matching full:let
122 /// let bytes = &[4, 1, 2, 3, 4, 5, 6, 7, 8, 9][..];
124 /// let packet = Packet::ref_from_bytes(bytes).unwrap();
130 /// let split = packet.split_at(packet.length as usize).unwrap();
134 /// let (packet, rest) = split.via_immutable();
210 /// let mut bytes = &mut [4, 1, 2, 3, 4, 5, 6, 7, 8, 9][..];
212 /// let packet = Packet::<[u8]>::mut_from_bytes(bytes).unwrap();
219 /// let split = packet.split_at_mut(packet.length as usize).unwrap();
223 /// let (packet, rest) = split.via_into_bytes();
308 let source = Ptr::from_ref(self.source); in into_ptr()
331 /// let bytes = &[4, 1, 2, 3, 4, 5, 6, 7, 8, 9][..];
333 /// let packet = Packet::ref_from_bytes(bytes).unwrap();
339 /// let split = packet.split_at(packet.length as usize).unwrap();
343 /// let (packet, rest) = split.via_immutable();
373 let (l, r) = self.into_ptr().via_immutable(); in via_immutable()
394 /// let bytes = &[4, 1, 2, 3, 4, 5, 6, 7, 8, 9][..];
396 /// let packet = Packet::<[u8]>::ref_from_bytes(bytes).unwrap();
402 /// let split = packet.split_at(packet.length as usize).unwrap();
406 /// let (packet, rest) = split.via_into_bytes();
422 let (l, r) = self.into_ptr().via_into_bytes(); in via_into_bytes()
443 /// let bytes = &[4, 1, 2, 3, 4, 5, 6, 7, 8, 9][..];
445 /// let packet = Packet::ref_from_bytes(bytes).unwrap();
451 /// let split = packet.split_at(packet.length as usize).unwrap();
455 /// let (packet, rest) = split.via_unaligned();
471 let (l, r) = self.into_ptr().via_unaligned(); in via_unaligned()
498 /// let bytes = [
506 /// let packet = Packet::ref_from_bytes(bytes.as_bytes()).unwrap();
512 /// let split = packet.split_at(packet.length.into()).unwrap();
516 /// let (packet, rest) = split.via_runtime_check().unwrap();
523 /// let idx = packet.length.get() - 1;
524 /// let split = packet.split_at(idx as usize).unwrap();
595 let (l, r) = unsafe { self.into_ptr().via_unchecked() }; in via_unchecked()
606 let source = Ptr::from_mut(self.source); in into_ptr()
629 /// let mut bytes = &mut [4, 1, 2, 3, 4, 5, 6, 7, 8, 9][..];
631 /// let packet = Packet::<[u8]>::mut_from_bytes(bytes).unwrap();
638 /// let split = packet.split_at_mut(packet.length as usize).unwrap();
642 /// let (packet, rest) = split.via_into_bytes();
664 let (l, r) = self.into_ptr().via_into_bytes(); in via_into_bytes()
685 /// let mut bytes = &mut [4, 1, 2, 3, 4, 5, 6, 7, 8, 9][..];
687 /// let packet = Packet::<[u8]>::mut_from_bytes(bytes).unwrap();
694 /// let split = packet.split_at_mut(packet.length as usize).unwrap();
698 /// let (packet, rest) = split.via_unaligned();
720 let (l, r) = self.into_ptr().via_unaligned(); in via_unaligned()
743 /// let mut bytes = &mut [4, 1, 2, 3, 4, 5, 6, 7, 8, 9][..];
745 /// let packet = Packet::<[u8]>::mut_from_bytes(bytes).unwrap();
752 /// let split = packet.split_at_mut(packet.length as usize).unwrap();
756 /// let (packet, rest) = split.via_runtime_check().unwrap();
800 let (l, r) = unsafe { self.into_ptr().via_unchecked() }; in via_unchecked()
885 let l_len = self.l_len(); in via_runtime_check()
909 let l_len = self.l_len(); in via_unchecked()
910 let inner = self.source.as_inner(); in via_unchecked()
914 let (left, right) = unsafe { inner.split_at_unchecked(l_len) }; in via_unchecked()
931 let left = unsafe { Ptr::from_inner(left) }; in via_unchecked()
947 let right = unsafe { Ptr::from_inner(right) }; in via_unchecked()
970 let n: usize = BUFFER_SIZE - OFFSET; in test_split_at()
971 let arr = [1; BUFFER_SIZE]; in test_split_at()
972 let dst = SliceDst::<OFFSET>::ref_from_bytes(&arr[..]).unwrap(); in test_split_at()
974 let (l, r) = dst.split_at(i).unwrap().via_runtime_check().unwrap(); in test_split_at()
975 let l_sum: u8 = l.trailing.iter().sum(); in test_split_at()
976 let r_sum: u8 = r.iter().sum(); in test_split_at()
983 let n: usize = BUFFER_SIZE - OFFSET; in test_split_at()
984 let mut arr = [1; BUFFER_SIZE]; in test_split_at()
985 let dst = SliceDst::<OFFSET>::mut_from_bytes(&mut arr[..]).unwrap(); in test_split_at()
987 let (l, r) = dst.split_at_mut(i).unwrap().via_runtime_check().unwrap(); in test_split_at()
988 let l_sum: u8 = l.trailing.iter().sum(); in test_split_at()
989 let r_sum: u8 = r.iter().sum(); in test_split_at()
1016 let arr = [1u16; N]; in test_split_at_overlapping()
1017 let dst = SliceDst::ref_from_bytes(arr.as_bytes()).unwrap(); in test_split_at_overlapping()
1020 let split = dst.split_at(i).unwrap().via_runtime_check(); in test_split_at_overlapping()
1031 let mut arr = [1, 2, 3, 4]; in test_split_at_unchecked()
1032 let slice = &arr[..]; in test_split_at_unchecked()
1034 let split = unsafe { SplitAt::split_at_unchecked(slice, 2) }; in test_split_at_unchecked()
1036 let (l, r) = unsafe { split.via_unchecked() }; in test_split_at_unchecked()
1040 let slice_mut = &mut arr[..]; in test_split_at_unchecked()
1042 let split = unsafe { SplitAt::split_at_mut_unchecked(slice_mut, 2) }; in test_split_at_unchecked()
1044 let (l, r) = unsafe { split.via_unchecked() }; in test_split_at_unchecked()
1059 let arr = [1, 2, 3, 4]; in test_split_at_via_methods()
1060 let packet = Packet::ref_from_bytes(&arr[..]).unwrap(); in test_split_at_via_methods()
1062 let split1 = packet.split_at(2).unwrap(); in test_split_at_via_methods()
1063 let (l, r) = split1.via_immutable(); in test_split_at_via_methods()
1067 let split2 = packet.split_at(2).unwrap(); in test_split_at_via_methods()
1068 let (l, r) = split2.via_into_bytes(); in test_split_at_via_methods()
1082 let arr = [1, 2, 3, 4]; in test_split_at_via_unaligned()
1083 let packet = Packet::ref_from_bytes(&arr[..]).unwrap(); in test_split_at_via_unaligned()
1085 let split = packet.split_at(2).unwrap(); in test_split_at_via_unaligned()
1086 let (l, r) = split.via_unaligned(); in test_split_at_via_unaligned()