Trait compio_buf::Indexable

source ·
pub trait Indexable {
    type Output;

    // Required method
    fn index(&self, n: usize) -> Option<&Self::Output>;
}
Expand description

A trait for vectored buffers that could be indexed.

Required Associated Types§

source

type Output

Output item

Required Methods§

source

fn index(&self, n: usize) -> Option<&Self::Output>

Get the item with specific index.

Implementations on Foreign Types§

source§

impl<T> Indexable for &[T]

source§

type Output = T

source§

fn index(&self, n: usize) -> Option<&T>

source§

impl<T> Indexable for &mut [T]

source§

type Output = T

source§

fn index(&self, n: usize) -> Option<&T>

source§

impl<T, A: Allocator + 'static> Indexable for Vec<T, A>

source§

type Output = T

source§

fn index(&self, n: usize) -> Option<&T>

source§

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

source§

type Output = T

source§

fn index(&self, n: usize) -> Option<&T>

source§

impl<T, const N: usize> Indexable for ArrayVec<T, N>

Available on crate feature arrayvec only.
source§

type Output = T

source§

fn index(&self, n: usize) -> Option<&T>

source§

impl<T: Indexable> Indexable for &T

source§

type Output = <T as Indexable>::Output

source§

fn index(&self, n: usize) -> Option<&T::Output>

source§

impl<T: Indexable> Indexable for &mut T

source§

type Output = <T as Indexable>::Output

source§

fn index(&self, n: usize) -> Option<&T::Output>

Implementors§