Skip to main content

subslice_const

Function subslice_const 

Source
pub const unsafe fn subslice_const<T>(slice: &[T], range: Range<usize>) -> &[T]
Expand description

A const variant of &slice[range].

§Panics

This function will panic if the range is invalid. This check is only performed in debug mode.

§Safety

This function does not verify the out-of-bounds access. It is up to the caller to ensure that the range is valid.