Lines Matching defs:Split
136 unsafe fn split_at_unchecked(&self, l_len: usize) -> Split<&Self> {
138 unsafe { Split::<&Self>::new(self, l_len) }
198 fn split_at(&self, l_len: usize) -> Option<Split<&Self>> {
204 unsafe { Split::new(self, l_len.get()) }
221 unsafe fn split_at_mut_unchecked(&mut self, l_len: usize) -> Split<&mut Self> {
223 unsafe { Split::<&mut Self>::new(self, l_len) }
275 fn split_at_mut(&mut self, l_len: usize) -> Option<Split<&mut Self>> {
281 unsafe { Split::new(self, l_len.get()) }
338 pub struct Split<T> {
350 impl<T> Split<T> {
351 /// Produces a `Split` of `source` with `l_len`.
362 impl<'a, T> Split<&'a T>
367 fn into_ptr(self) -> Split<Ptr<'a, T, (Shared, Aligned, Safe)>> {
371 unsafe { Split::new(source, self.l_len) }
475 /// See [`Split::via_immutable`](#method.split_via_immutable.codegen).
487 #[deprecated(note = "use `Split::via_no_dynamic_padding` instead")]
568 /// See [`Split::via_immutable`](#method.split_via_immutable.codegen).
689 impl<'a, T> Split<&'a mut T>
694 fn into_ptr(self) -> Split<Ptr<'a, T, (Exclusive, Aligned, Safe)>> {
698 unsafe { Split::new(source, self.l_len) }
746 /// See [`Split::via_immutable`](#method.split_via_immutable.codegen).
758 #[deprecated(note = "use `Split::via_no_dynamic_padding` instead")]
843 /// See [`Split::via_immutable`](#method.split_via_immutable.codegen).
894 /// See [`Split::via_runtime_check`](#method.split_via_runtime_check.codegen).
916 /// See [`Split::via_unchecked`](#method.split_via_unchecked.codegen).
928 impl<'a, T, I> Split<Ptr<'a, T, I>>
933 fn into_ref(self) -> Split<&'a T>
940 unsafe { Split::new(self.source.as_ref(), self.l_len) }
943 fn into_mut(self) -> Split<&'a mut T>
950 unsafe { Split::new(self.source.unify_invariants().as_mut(), self.l_len) }
956 // SAFETY: By invariant on `Split`, `self.l_len` is not greater than the
992 "`Split::via_no_dynamic_padding` cannot be used with a type whose layout may require dynamic trailing padding; use `Split::via_runtime_check` instead"
997 // `self.l_len()`, which is valid by `Split`'s invariant—describes an
1206 // Split the packed field separately: the unpacked outer struct's
1401 use crate::{Immutable, KnownLayout, Split, SplitAt, Unaligned};
1403 fn via_unaligned<'a, T>(split: Split<&'a T>) -> (&'a T, &'a [T::Elem])
1410 fn via_unaligned_mut<'a, T>(split: Split<&'a mut T>) -> (&'a mut T, &'a mut [T::Elem])