Skip to main content

SliceExt

Trait SliceExt 

Source
pub trait SliceExt<T> {
    // Required methods
    fn as_ptr_perm(&self) -> (*const T, Ghost<&Perm<*const [T]>>);
    fn as_mut_ptr_perm(&mut self) -> (*mut T, Ghost<&mut Perm<*const [T]>>);
}

Required Methods§

Implementations on Foreign Types§

Source§

impl<T> SliceExt<T> for [T]

Source§

fn as_ptr_perm(&self) -> (*const T, Ghost<&Perm<*const [T]>>)

Convert &[T] to *const T and a shared ownership token.

Source§

fn as_mut_ptr_perm(&mut self) -> (*mut T, Ghost<&mut Perm<*const [T]>>)

Convert &mut [T] to *mut T and a mutable ownership token.

Implementors§