pub trait IdxSliceIndex<I, T>: Sealedwhere
I: Idx,{
type Output: ?Sized;
// Required methods
fn get(self, slice: &IndexSlice<I, [T]>) -> Option<&Self::Output>;
fn get_mut(
self,
slice: &mut IndexSlice<I, [T]>,
) -> Option<&mut Self::Output>;
fn index(self, slice: &IndexSlice<I, [T]>) -> &Self::Output;
fn index_mut(self, slice: &mut IndexSlice<I, [T]>) -> &mut Self::Output;
}Expand description
This is the equivalent of the sealed core::slice::SliceIndex trait. It
cannot be overridden from user, code nor should it normally need use
directly (Outside of trait bounds, I guess).
Required Associated Types§
Required Methods§
fn get(self, slice: &IndexSlice<I, [T]>) -> Option<&Self::Output>
fn get_mut(self, slice: &mut IndexSlice<I, [T]>) -> Option<&mut Self::Output>
fn index(self, slice: &IndexSlice<I, [T]>) -> &Self::Output
fn index_mut(self, slice: &mut IndexSlice<I, [T]>) -> &mut Self::Output
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".