Feature gate: #![feature(slice_take)]
Public API
impl<T> [T] {
fn split_off<'a, R: OneSidedRange<usize>>(self: &mut &'a Self, range: R) -> Option<&'a Self>;
fn split_off_mut<'a, R: OneSidedRange<usize>>(self: &mut &'a mut Self, range: R) -> Option<&'a mut Self>;
fn split_off_first<'a>(self: &mut &'a Self) -> Option<&'a T>;
fn split_off_first_mut<'a>(self: &mut &'a mut Self) -> Option<&'a mut T>;
fn split_off_last<'a>(self: &mut &'a Self) -> Option<&'a T>;
fn split_off_last_mut<'a>(self: &mut &'a mut Self) -> Option<&'a mut T>;
}
// core::ops
trait OneSidedRange<T: ?Sized>: RangeBounds<T> {}
impl<T> OneSidedRange<T> for RangeTo<T> where Self: RangeBounds<T>;
impl<T> OneSidedRange<T> for RangeFrom<T> where Self: RangeBounds<T>;
impl<T> OneSidedRange<T> for RangeToInclusive<T> where Self: RangeBounds<T>;
Steps / History
Unresolved Questions
Feature gate:
#![feature(slice_take)]Public API
Steps / History
take_...functions to slices #62282take_...functions to slices #77065slice::take...methods tosplit_off...#136555Unresolved Questions