pub trait IntoPtrSlice<T: TransparentPtrType> {
    // Required method
    fn run_with_ptr_slice<R, F: FnOnce(&[<T as GlibPtrDefault>::GlibType]) -> R>(
        self,
        f: F
    ) -> R;
}
Expand description

A trait to accept both &[T] or PtrSlice<T> as an argument.

Required Methods§

source

fn run_with_ptr_slice<R, F: FnOnce(&[<T as GlibPtrDefault>::GlibType]) -> R>( self, f: F ) -> R

Runs the given closure with a NULL-terminated array.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'a, T: TransparentPtrType> IntoPtrSlice<T> for &'a [T]

source§

fn run_with_ptr_slice<R, F: FnOnce(&[<T as GlibPtrDefault>::GlibType]) -> R>( self, f: F ) -> R

source§

impl<T: TransparentPtrType> IntoPtrSlice<T> for Vec<T>

source§

fn run_with_ptr_slice<R, F: FnOnce(&[<T as GlibPtrDefault>::GlibType]) -> R>( self, f: F ) -> R

source§

impl<T: TransparentPtrType, const N: usize> IntoPtrSlice<T> for [T; N]

source§

fn run_with_ptr_slice<R, F: FnOnce(&[<T as GlibPtrDefault>::GlibType]) -> R>( self, f: F ) -> R

Implementors§