doc.rust-lang.org
pub const fn chunks_mut(&mut self, chunk_size: usize) -> ChunksMut<'_, T>
Returns an iterator over chunk_size elements of the slice at a time, starting at the beginning of the slice.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn chunks_exact_mut(&mut self, chunk_size: usize) -> ChunksExactMut<'_, T>
Returns an iterator over chunk_size elements of the slice at a time, starting at the beginning of the slice.
method
core
Stable since 1.31.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn chunks_exact(&self, chunk_size: usize) -> ChunksExact<'_, T>
Returns an iterator over chunk_size elements of the slice at a time, starting at the beginning of the slice.
method
core
Stable since 1.31.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn chunks(&self, chunk_size: usize) -> Chunks<'_, T>
Returns an iterator over chunk_size elements of the slice at a time, starting at the beginning of the slice.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn chunk_by_mut<F>(&mut self, pred: F) -> ChunkByMut<'_, T, F>
Returns an iterator over the slice producing non-overlapping mutable runs of elements using the predicate to separate them.
method
core
Stable since 1.77.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn chunk_by<F>(&self, pred: F) -> ChunkBy<'_, T, F>
Returns an iterator over the slice producing non-overlapping runs of elements using the predicate to separate them.
method
core
Stable since 1.77.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn binary_search_by_key<'a, B, F>(&'a self, b: &B, f: F) -> Result<usize, usize>
Binary searches this slice with a key extraction function.
method
core
Stable since 1.10.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn binary_search_by<'a, F>(&'a self, f: F) -> Result<usize, usize>
Binary searches this slice with a comparator function.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn binary_search(&self, x: &T) -> Result<usize, usize>
Binary searches this slice for a given element. If the slice is not sorted, the returned result is unspecified and meaningless.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn assume_init_ref(&self) -> &[T]
Gets a shared reference to the contained value.
method
core
Stable since 1.93.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn assume_init_mut(&mut self) -> &mut [T]
Gets a mutable (unique) reference to the contained value.
method
core
Stable since 1.93.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn assume_init_drop(&mut self)
Drops the contained values in place.
method
core
Stable since 1.93.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct EscapeAscii<'a>
An iterator over the escaped version of a byte slice.
struct
core
Stable since 1.60.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn as_rchunks_mut<const N: usize>(&mut self) -> (&mut [T], &mut [[T; N]])
Splits the slice into a slice of N-element arrays, starting at the end of the slice, and a remainder slice with length strictly less than N.
method
core
Stable since 1.88.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn as_rchunks<const N: usize>(&self) -> (&[T], &[[T; N]])
Splits the slice into a slice of N-element arrays, starting at the end of the slice, and a remainder slice with length strictly less than N.
method
core
Stable since 1.88.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn as_ptr_range(&self) -> Range<*const T>
Returns the two raw pointers spanning the slice.
method
core
Stable since 1.48.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn as_ptr(&self) -> *const T
Returns a raw pointer to the slice's buffer.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn as_mut_ptr_range(&mut self) -> Range<*mut T>
Returns the two unsafe mutable pointers spanning the slice.
method
core
Stable since 1.48.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn as_mut_ptr(&mut self) -> *mut T
Returns an unsafe mutable pointer to the slice's buffer.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn as_mut_array<const N: usize>(&mut self) -> Option<&mut [T; N]>
Gets a mutable reference to the slice's underlying array.
method
core
Stable since 1.93.0
Version 1.100.0-nightly