pub trait TupleCollect: Sized {
    type Item;
    type Buffer: Default + AsRef<[Option<Self::Item>]> + AsMut<[Option<Self::Item>]>;

    // Required methods
    fn collect_from_iter<I>(iter: I, buf: &mut Self::Buffer) -> Option<Self>
       where I: IntoIterator<Item = Self::Item>;
    fn collect_from_iter_no_buf<I>(iter: I) -> Option<Self>
       where I: IntoIterator<Item = Self::Item>;
    fn num_items() -> usize;
    fn left_shift_push(&mut self, item: Self::Item);

    // Provided method
    fn buffer_len(buf: &Self::Buffer) -> usize { ... }
}

Required Associated Types§

source

type Item

source

type Buffer: Default + AsRef<[Option<Self::Item>]> + AsMut<[Option<Self::Item>]>

Required Methods§

source

fn collect_from_iter<I>(iter: I, buf: &mut Self::Buffer) -> Option<Self>where I: IntoIterator<Item = Self::Item>,

source

fn collect_from_iter_no_buf<I>(iter: I) -> Option<Self>where I: IntoIterator<Item = Self::Item>,

source

fn num_items() -> usize

source

fn left_shift_push(&mut self, item: Self::Item)

Provided Methods§

source

fn buffer_len(buf: &Self::Buffer) -> usize

Implementations on Foreign Types§

source§

impl<A> TupleCollect for (A, A, A, A, A, A, A, A, A, A, A)

§

type Item = A

§

type Buffer = [Option<A>; 10]

source§

fn collect_from_iter<I>(iter: I, buf: &mut Self::Buffer) -> Option<Self>where I: IntoIterator<Item = A>,

source§

fn collect_from_iter_no_buf<I>(iter: I) -> Option<Self>where I: IntoIterator<Item = A>,

source§

fn num_items() -> usize

source§

fn left_shift_push(&mut self, item: A)

source§

impl<A> TupleCollect for (A, A, A, A)

§

type Item = A

§

type Buffer = [Option<A>; 3]

source§

fn collect_from_iter<I>(iter: I, buf: &mut Self::Buffer) -> Option<Self>where I: IntoIterator<Item = A>,

source§

fn collect_from_iter_no_buf<I>(iter: I) -> Option<Self>where I: IntoIterator<Item = A>,

source§

fn num_items() -> usize

source§

fn left_shift_push(&mut self, item: A)

source§

impl<A> TupleCollect for (A, A, A, A, A)

§

type Item = A

§

type Buffer = [Option<A>; 4]

source§

fn collect_from_iter<I>(iter: I, buf: &mut Self::Buffer) -> Option<Self>where I: IntoIterator<Item = A>,

source§

fn collect_from_iter_no_buf<I>(iter: I) -> Option<Self>where I: IntoIterator<Item = A>,

source§

fn num_items() -> usize

source§

fn left_shift_push(&mut self, item: A)

source§

impl<A> TupleCollect for (A, A, A, A, A, A, A, A, A, A, A, A)

§

type Item = A

§

type Buffer = [Option<A>; 11]

source§

fn collect_from_iter<I>(iter: I, buf: &mut Self::Buffer) -> Option<Self>where I: IntoIterator<Item = A>,

source§

fn collect_from_iter_no_buf<I>(iter: I) -> Option<Self>where I: IntoIterator<Item = A>,

source§

fn num_items() -> usize

source§

fn left_shift_push(&mut self, item: A)

source§

impl<A> TupleCollect for (A, A, A, A, A, A, A, A, A, A)

§

type Item = A

§

type Buffer = [Option<A>; 9]

source§

fn collect_from_iter<I>(iter: I, buf: &mut Self::Buffer) -> Option<Self>where I: IntoIterator<Item = A>,

source§

fn collect_from_iter_no_buf<I>(iter: I) -> Option<Self>where I: IntoIterator<Item = A>,

source§

fn num_items() -> usize

source§

fn left_shift_push(&mut self, item: A)

source§

impl<A> TupleCollect for (A,)

§

type Item = A

§

type Buffer = [Option<A>; 0]

source§

fn collect_from_iter<I>(iter: I, buf: &mut Self::Buffer) -> Option<Self>where I: IntoIterator<Item = A>,

source§

fn collect_from_iter_no_buf<I>(iter: I) -> Option<Self>where I: IntoIterator<Item = A>,

source§

fn num_items() -> usize

source§

fn left_shift_push(&mut self, item: A)

source§

impl<A> TupleCollect for (A, A, A, A, A, A, A, A)

§

type Item = A

§

type Buffer = [Option<A>; 7]

source§

fn collect_from_iter<I>(iter: I, buf: &mut Self::Buffer) -> Option<Self>where I: IntoIterator<Item = A>,

source§

fn collect_from_iter_no_buf<I>(iter: I) -> Option<Self>where I: IntoIterator<Item = A>,

source§

fn num_items() -> usize

source§

fn left_shift_push(&mut self, item: A)

source§

impl<A> TupleCollect for (A, A, A, A, A, A, A, A, A)

§

type Item = A

§

type Buffer = [Option<A>; 8]

source§

fn collect_from_iter<I>(iter: I, buf: &mut Self::Buffer) -> Option<Self>where I: IntoIterator<Item = A>,

source§

fn collect_from_iter_no_buf<I>(iter: I) -> Option<Self>where I: IntoIterator<Item = A>,

source§

fn num_items() -> usize

source§

fn left_shift_push(&mut self, item: A)

source§

impl<A> TupleCollect for (A, A, A)

§

type Item = A

§

type Buffer = [Option<A>; 2]

source§

fn collect_from_iter<I>(iter: I, buf: &mut Self::Buffer) -> Option<Self>where I: IntoIterator<Item = A>,

source§

fn collect_from_iter_no_buf<I>(iter: I) -> Option<Self>where I: IntoIterator<Item = A>,

source§

fn num_items() -> usize

source§

fn left_shift_push(&mut self, item: A)

source§

impl<A> TupleCollect for (A, A, A, A, A, A)

§

type Item = A

§

type Buffer = [Option<A>; 5]

source§

fn collect_from_iter<I>(iter: I, buf: &mut Self::Buffer) -> Option<Self>where I: IntoIterator<Item = A>,

source§

fn collect_from_iter_no_buf<I>(iter: I) -> Option<Self>where I: IntoIterator<Item = A>,

source§

fn num_items() -> usize

source§

fn left_shift_push(&mut self, item: A)

source§

impl<A> TupleCollect for (A, A, A, A, A, A, A)

§

type Item = A

§

type Buffer = [Option<A>; 6]

source§

fn collect_from_iter<I>(iter: I, buf: &mut Self::Buffer) -> Option<Self>where I: IntoIterator<Item = A>,

source§

fn collect_from_iter_no_buf<I>(iter: I) -> Option<Self>where I: IntoIterator<Item = A>,

source§

fn num_items() -> usize

source§

fn left_shift_push(&mut self, item: A)

source§

impl<A> TupleCollect for (A, A)

§

type Item = A

§

type Buffer = [Option<A>; 1]

source§

fn collect_from_iter<I>(iter: I, buf: &mut Self::Buffer) -> Option<Self>where I: IntoIterator<Item = A>,

source§

fn collect_from_iter_no_buf<I>(iter: I) -> Option<Self>where I: IntoIterator<Item = A>,

source§

fn num_items() -> usize

source§

fn left_shift_push(&mut self, item: A)

Implementors§