Trait View

Source
pub trait View<'a> {
    type Type: Viewed;

    // Required method
    fn view(&'a self) -> Self::Type;
}
Expand description

A trait defining a collection that can be accessed via an immutable (shared) view. This type of view can be cloned and copied.

Required Associated Types§

Required Methods§

Source

fn view(&'a self) -> Self::Type

Implementations on Foreign Types§

Source§

impl<'a, I: IntBound> View<'a> for Range<I>

Source§

type Type = Range<I>

Source§

fn view(&'a self) -> Self::Type

Source§

impl<'a, I: IntBound> View<'a> for RangeInclusive<I>

Source§

type Type = RangeInclusive<I>

Source§

fn view(&'a self) -> Self::Type

Source§

impl<'a, I: IntBound> View<'a> for RangeTo<I>

Source§

type Type = RangeTo<I>

Source§

fn view(&'a self) -> Self::Type

Source§

impl<'a, I: IntBound> View<'a> for RangeToInclusive<I>

Source§

type Type = RangeToInclusive<I>

Source§

fn view(&'a self) -> Self::Type

Source§

impl<'a, S: View<'a>> View<'a> for Box<S>

Source§

type Type = <S as View<'a>>::Type

Source§

fn view(&'a self) -> Self::Type

Source§

impl<'a, S: View<'a>, T: View<'a>> View<'a> for (S, T)

Source§

type Type = (<S as View<'a>>::Type, <T as View<'a>>::Type)

Source§

fn view(&'a self) -> Self::Type

Source§

impl<'a, S: ?Sized + 'a + View<'a>> View<'a> for &S

Blanket implementation of View for all immutable borrows.

Source§

type Type = <S as View<'a>>::Type

Source§

fn view(&'a self) -> Self::Type

Source§

impl<'a, S: ?Sized + 'a + View<'a>> View<'a> for &mut S

Blanket implementation of View for all mutable borrows.

Source§

type Type = <S as View<'a>>::Type

Source§

fn view(&'a self) -> Self::Type

Source§

impl<'a, T: 'a> View<'a> for [T; 1]

Source§

type Type = &'a [T; 1]

Source§

fn view(&'a self) -> Self::Type

Source§

impl<'a, T: 'a> View<'a> for [T; 2]

Source§

type Type = &'a [T; 2]

Source§

fn view(&'a self) -> Self::Type

Source§

impl<'a, T: 'a> View<'a> for [T; 3]

Source§

type Type = &'a [T; 3]

Source§

fn view(&'a self) -> Self::Type

Source§

impl<'a, T: 'a> View<'a> for [T; 4]

Source§

type Type = &'a [T; 4]

Source§

fn view(&'a self) -> Self::Type

Source§

impl<'a, T: 'a> View<'a> for [T; 5]

Source§

type Type = &'a [T; 5]

Source§

fn view(&'a self) -> Self::Type

Source§

impl<'a, T: 'a> View<'a> for [T; 6]

Source§

type Type = &'a [T; 6]

Source§

fn view(&'a self) -> Self::Type

Source§

impl<'a, T: 'a> View<'a> for [T; 7]

Source§

type Type = &'a [T; 7]

Source§

fn view(&'a self) -> Self::Type

Source§

impl<'a, T: 'a> View<'a> for [T; 8]

Source§

type Type = &'a [T; 8]

Source§

fn view(&'a self) -> Self::Type

Source§

impl<'a, T: 'a> View<'a> for [T; 9]

Source§

type Type = &'a [T; 9]

Source§

fn view(&'a self) -> Self::Type

Source§

impl<'a, T: 'a> View<'a> for [T; 10]

Source§

type Type = &'a [T; 10]

Source§

fn view(&'a self) -> Self::Type

Source§

impl<'a, T: 'a> View<'a> for [T; 11]

Source§

type Type = &'a [T; 11]

Source§

fn view(&'a self) -> Self::Type

Source§

impl<'a, T: 'a> View<'a> for [T; 12]

Source§

type Type = &'a [T; 12]

Source§

fn view(&'a self) -> Self::Type

Source§

impl<'a, T: 'a> View<'a> for [T; 13]

Source§

type Type = &'a [T; 13]

Source§

fn view(&'a self) -> Self::Type

Source§

impl<'a, T: 'a> View<'a> for [T; 14]

Source§

type Type = &'a [T; 14]

Source§

fn view(&'a self) -> Self::Type

Source§

impl<'a, T: 'a> View<'a> for [T; 15]

Source§

type Type = &'a [T; 15]

Source§

fn view(&'a self) -> Self::Type

Source§

impl<'a, T: 'a> View<'a> for [T; 16]

Source§

type Type = &'a [T; 16]

Source§

fn view(&'a self) -> Self::Type

Source§

impl<'a, T: 'a> View<'a> for [T]

Source§

type Type = &'a [T]

Source§

fn view(&'a self) -> Self::Type

Source§

impl<'a, T: 'a> View<'a> for Vec<T>

Source§

type Type = &'a [T]

Source§

fn view(&'a self) -> Self::Type

Implementors§

Source§

impl<'a, O: AsRef<[usize]>> View<'a> for ClumpedOffsets<O>

Source§

impl<'a, O: AsRef<[usize]>> View<'a> for Offsets<O>

Source§

type Type = Offsets<&'a [usize]>

Source§

impl<'a, S> View<'a> for Select<S, Range<usize>>
where S: View<'a>,

Source§

type Type = Select<<S as View<'a>>::Type, Range<usize>>

Source§

impl<'a, S, I> View<'a> for Select<S, I>
where S: View<'a>, I: AsIndexSlice,

Source§

type Type = Select<<S as View<'a>>::Type, &'a [usize]>

Source§

impl<'a, S, I> View<'a> for Subset<S, I>
where S: View<'a>, I: AsRef<[usize]>,

Required for Chunked and UniChunked subsets.

Source§

type Type = Subset<<S as View<'a>>::Type, &'a [usize]>

Source§

impl<'a, S, N> View<'a> for UniChunked<S, N>
where S: View<'a>, N: Copy,

Source§

type Type = UniChunked<<S as View<'a>>::Type, N>

Source§

impl<'a, S, O> View<'a> for Chunked<S, O>
where S: View<'a>, O: View<'a>,

Source§

type Type = Chunked<<S as View<'a>>::Type, <O as View<'a>>::Type>

Source§

impl<'a, S, T, I> View<'a> for Sparse<S, T, I>
where S: View<'a>, T: View<'a>, I: AsIndexSlice,

Source§

type Type = Sparse<<S as View<'a>>::Type, <T as View<'a>>::Type, &'a [usize]>