doc.rust-lang.org
pub fn rsplit<F>(&self, pred: F) -> RSplit<'_, T, F>
Returns an iterator over subslices separated by elements that match pred, starting at the end of the slice and working backwards. The matched element is not contained in the subslices.
method
core
Stable since 1.27.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn rotate_right(&mut self, k: usize)
Rotates the slice in-place such that the first self.len() - k elements of the slice move to the end while the last k elements move to the front.
method
core
Stable since 1.26.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn rotate_left(&mut self, mid: usize)
Rotates the slice in-place such that the first mid elements of the slice move to the end while the last self.len() - mid elements move to the front.
method
core
Stable since 1.26.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn reverse(&mut self)
Reverses the order of elements in the slice, in place.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn rchunks_mut(&mut self, chunk_size: usize) -> RChunksMut<'_, T>
Returns an iterator over chunk_size elements of the slice at a time, starting at the end of the slice.
method
core
Stable since 1.31.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn rchunks_exact_mut(&mut self, chunk_size: usize) -> RChunksExactMut<'_, T>
Returns an iterator over chunk_size elements of the slice at a time, starting at the end of the slice.
method
core
Stable since 1.31.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn rchunks_exact(&self, chunk_size: usize) -> RChunksExact<'_, T>
Returns an iterator over chunk_size elements of the slice at a time, starting at the end of the slice.
method
core
Stable since 1.31.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn rchunks(&self, chunk_size: usize) -> RChunks<'_, T>
Returns an iterator over chunk_size elements of the slice at a time, starting at the end of the slice.
method
core
Stable since 1.31.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn from_ref<T>(s: &T) -> &[T]
Converts a reference to T into a slice of length 1 (without copying).
function
core
Stable since 1.28.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn from_raw_parts_mut<'a, T>(data: *mut T, len: usize) -> &'a mut [T]
Performs the same functionality as from_raw_parts, except that a mutable slice is returned.
function
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn from_raw_parts<'a, T>(data: *const T, len: usize) -> &'a [T]
Forms a slice from a pointer and a length.
function
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn from_mut<T>(s: &mut T) -> &mut [T]
Converts a reference to T into a slice of length 1 (without copying).
function
core
Stable since 1.28.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn partition_point<P>(&self, pred: P) -> usize
Returns the index of the partition point according to the given predicate (the index of the first element of the second partition).
method
core
Stable since 1.52.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn make_ascii_uppercase(&mut self)
Converts this slice to its ASCII upper case equivalent in-place.
method
core
Stable since 1.23.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn make_ascii_lowercase(&mut self)
Converts this slice to its ASCII lower case equivalent in-place.
method
core
Stable since 1.23.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn len(&self) -> usize
Returns the number of elements in the slice.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn last_mut(&mut self) -> Option<&mut T>
Returns a mutable reference to the last item in the slice, or None if it is empty.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn last_chunk_mut<const N: usize>(&mut self) -> Option<&mut [T; N]>
Returns a mutable array reference to the last N items in the slice.
method
core
Stable since 1.77.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn last_chunk<const N: usize>(&self) -> Option<&[T; N]>
Returns an array reference to the last N items in the slice.
method
core
Stable since 1.77.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn last(&self) -> Option<&T>
Returns the last element of the slice, or None if it is empty.
method
core
Stable since 1.0.0
Version 1.100.0-nightly