[][src]Trait const_buffer::BufferIndex

pub trait BufferIndex<'a, T> {
    type Output: ?Sized;
    unsafe fn get<const N: usize>(
        self,
        buffer: &'a ConstBuffer<T, N>
    ) -> &'a Self::Output;
unsafe fn get_mut<const N: usize>(
        self,
        buffer: &'a mut ConstBuffer<T, N>
    ) -> &'a mut Self::Output; }

A helper trait that generalizes over positions and ranges to be used as a trait bound for get and get_mut.

This trait is automatically implemented for types implementing SliceIndex, and it is not useful to implement this trait yourself.

Associated Types

type Output: ?Sized

Loading content...

Required methods

unsafe fn get<const N: usize>(
    self,
    buffer: &'a ConstBuffer<T, N>
) -> &'a Self::Output

unsafe fn get_mut<const N: usize>(
    self,
    buffer: &'a mut ConstBuffer<T, N>
) -> &'a mut Self::Output

Loading content...

Implementors

impl<'a, T, O: ?Sized, I> BufferIndex<'a, T> for I where
    I: SliceIndex<[MaybeUninit<T>], Output: UninitWrapper<Output = O> + 'a> + Clone
[src]

type Output = O

Loading content...