TupleCollect

Trait TupleCollect 

Source
pub trait TupleCollect<T> {
    // Required methods
    fn collect_tuple<B>(self) -> B
       where B: TupleFromIter<T>;
    fn try_collect_tuple<B>(self) -> Option<B>
       where B: TupleTryFromIter<T>;
    fn collect_tuple_try<B>(self) -> <B as TupleFromIterTry<T>>::OutTuple
       where B: TupleFromIterTry<T>;
}

Required Methods§

Source

fn collect_tuple<B>(self) -> B
where B: TupleFromIter<T>,

Such as Iter<T> -> (T, T, T), panic on failure

Source

fn try_collect_tuple<B>(self) -> Option<B>
where B: TupleTryFromIter<T>,

Such as Iter<T> -> Option<(T, T, T)>

Source

fn collect_tuple_try<B>(self) -> <B as TupleFromIterTry<T>>::OutTuple
where B: TupleFromIterTry<T>,

Such as Iter<T> -> (Option<T>, Option<T>, Option<T>)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<I, T> TupleCollect<T> for I
where I: IntoIterator<Item = T>,