[][src]Trait web_glitz::buffer::BufferViewSliceIndex

pub trait BufferViewSliceIndex<T>: Sized {
    type Output: ?Sized;
    fn get<'a>(
        self,
        view: &'a BufferView<[T]>
    ) -> Option<BufferView<'a, Self::Output>>;
unsafe fn get_unchecked<'a>(
        self,
        view: &'a BufferView<[T]>
    ) -> BufferView<'a, Self::Output>; }

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

Associated Types

type Output: ?Sized

The output type returned by the indexing operations.

Loading content...

Required methods

fn get<'a>(
    self,
    view: &'a BufferView<[T]>
) -> Option<BufferView<'a, Self::Output>>

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

unsafe fn get_unchecked<'a>(
    self,
    view: &'a BufferView<[T]>
) -> BufferView<'a, Self::Output>

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

Loading content...

Implementations on Foreign Types

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

type Output = T

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

type Output = [T]

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

type Output = [T]

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

type Output = [T]

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

type Output = [T]

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

type Output = [T]

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

type Output = [T]

Loading content...

Implementors

Loading content...