pub trait SliceCopy: Copy {
// Required methods
fn slice<R: SliceRange>(self, range: R) -> Self;
fn get_slice<R: SliceRange>(self, range: R) -> Option<Self>;
}Expand description
Required Methods§
Sourcefn slice<R: SliceRange>(self, range: R) -> Self
fn slice<R: SliceRange>(self, range: R) -> Self
Creates an immutable view of the data contained in range.
Sourcefn get_slice<R: SliceRange>(self, range: R) -> Option<Self>
fn get_slice<R: SliceRange>(self, range: R) -> Option<Self>
Creates an immutable view of the data contained in range, or return
None if it is out of bounds.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".