[][src]Trait web_glitz::buffer::BufferSliceIndex

pub trait BufferSliceIndex<T>: Sized {
    type Output: ?Sized;
    fn get(self, buffer: &Buffer<[T]>) -> Option<BufferView<'_, Self::Output>>;
unsafe fn get_unchecked(
        self,
        buffer: &Buffer<[T]>
    ) -> BufferView<'_, Self::Output>; fn get_mut(
        self,
        buffer: &mut Buffer<[T]>
    ) -> Option<BufferViewMut<'_, Self::Output>> { ... }
unsafe fn get_unchecked_mut(
        self,
        buffer: &mut Buffer<[T]>
    ) -> BufferViewMut<'_, Self::Output> { ... } }

A helper trait type for indexing operations on a Buffer that contains a slice.

Associated Types

type Output: ?Sized

The output type returned by the indexing operations.

Loading content...

Required methods

fn get(self, buffer: &Buffer<[T]>) -> Option<BufferView<'_, Self::Output>>

Returns a view on the output for this operation if in bounds, or None otherwise.

unsafe fn get_unchecked(
    self,
    buffer: &Buffer<[T]>
) -> BufferView<'_, Self::Output>

Returns a view on the output for this operation, without performing any bounds checking.

Loading content...

Provided methods

fn get_mut(
    self,
    buffer: &mut Buffer<[T]>
) -> Option<BufferViewMut<'_, Self::Output>>

Returns a mutable view on the output for this operation if in bounds, or None otherwise.

unsafe fn get_unchecked_mut(
    self,
    buffer: &mut Buffer<[T]>
) -> BufferViewMut<'_, Self::Output>

Returns a mutable view the output for this operation, without performing any bounds checking.

Loading content...

Implementations on Foreign Types

impl<T> BufferSliceIndex<T> for usize[src]

type Output = T

impl<T> BufferSliceIndex<T> for RangeFull[src]

type Output = [T]

impl<T> BufferSliceIndex<T> for Range<usize>[src]

type Output = [T]

impl<T> BufferSliceIndex<T> for RangeInclusive<usize>[src]

type Output = [T]

impl<T> BufferSliceIndex<T> for RangeFrom<usize>[src]

type Output = [T]

impl<T> BufferSliceIndex<T> for RangeTo<usize>[src]

type Output = [T]

impl<T> BufferSliceIndex<T> for RangeToInclusive<usize>[src]

type Output = [T]

Loading content...

Implementors

Loading content...