pub trait GetSaferUnchecked<T> {
// Required methods
unsafe fn get_unchecked_release<I>(
&self,
index: I,
) -> &<I as SliceIndex<[T]>>::Output
where I: SliceIndex<[T]>;
unsafe fn get_unchecked_release_mut<I>(
&mut self,
index: I,
) -> &mut <I as SliceIndex<[T]>>::Output
where I: SliceIndex<[T]>;
}Required Methods§
Sourceunsafe fn get_unchecked_release<I>(
&self,
index: I,
) -> &<I as SliceIndex<[T]>>::Outputwhere
I: SliceIndex<[T]>,
unsafe fn get_unchecked_release<I>(
&self,
index: I,
) -> &<I as SliceIndex<[T]>>::Outputwhere
I: SliceIndex<[T]>,
§Safety
Calling this method with an out-of-bounds index is [undefined behavior] even if the resulting reference is not used.
Sourceunsafe fn get_unchecked_release_mut<I>(
&mut self,
index: I,
) -> &mut <I as SliceIndex<[T]>>::Outputwhere
I: SliceIndex<[T]>,
unsafe fn get_unchecked_release_mut<I>(
&mut self,
index: I,
) -> &mut <I as SliceIndex<[T]>>::Outputwhere
I: SliceIndex<[T]>,
§Safety
Calling this method with an out-of-bounds index is [undefined behavior] even if the resulting reference is not used.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.