Trait polars_utils::slice::GetSaferUnchecked

source ·
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§

source

unsafe fn get_unchecked_release<I>( &self, index: I ) -> &<I as SliceIndex<[T]>>::Output
where I: SliceIndex<[T]>,

§Safety

Calling this method with an out-of-bounds index is [undefined behavior] even if the resulting reference is not used.

source

unsafe fn get_unchecked_release_mut<I>( &mut self, index: I ) -> &mut <I as SliceIndex<[T]>>::Output
where I: SliceIndex<[T]>,

§Safety

Calling this method with an out-of-bounds index is [undefined behavior] even if the resulting reference is not used.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T> GetSaferUnchecked<T> for [T]

source§

unsafe fn get_unchecked_release<I>( &self, index: I ) -> &<I as SliceIndex<[T]>>::Output
where I: SliceIndex<[T]>,

source§

unsafe fn get_unchecked_release_mut<I>( &mut self, index: I ) -> &mut <I as SliceIndex<[T]>>::Output
where I: SliceIndex<[T]>,

Implementors§