compio_buf

Trait 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, const N: usize> Indexable for SmallVec<[T; N]>
where [T; N]: Array<Item = T>,

Available on crate feature smallvec 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§