Skip to main content

StreamTupleCons

Trait StreamTupleCons 

Source
pub trait StreamTupleCons<I, T> {
    type Output: StreamTuple<I>;

    // Required method
    fn cons(head: Stream<I, T>, tail: Self) -> Self::Output;
}
Expand description

Stream tuple construction.

This trait is used to prepend streams to existings stream tuples, which is necessary to implement stream methods that take a tuple of streams, as they need to be combined with the current stream (i.e. self) to construct a stream tuple for further consumption.

Required Associated Types§

Source

type Output: StreamTuple<I>

Output type of construction.

Required Methods§

Source

fn cons(head: Stream<I, T>, tail: Self) -> Self::Output

Prepends a stream to the stream tuple.

This method is used to prepend a stream to the tuple and consume it, constructing a new stream tuple that includes the given stream.

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.

Implementations on Foreign Types§

Source§

impl<I, T1> StreamTupleCons<I, T1> for ()

Source§

type Output = (Stream<I, T1>,)

Source§

fn cons(head: Stream<I, T1>, tail: Self) -> Self::Output

Source§

impl<I, T1, T2> StreamTupleCons<I, T1> for (Stream<I, T2>,)

Source§

type Output = (Stream<I, T1>, Stream<I, T2>)

Source§

fn cons(head: Stream<I, T1>, tail: Self) -> Self::Output

Source§

impl<I, T1, T2, T3> StreamTupleCons<I, T1> for (Stream<I, T2>, Stream<I, T3>)

Source§

type Output = (Stream<I, T1>, Stream<I, T2>, Stream<I, T3>)

Source§

fn cons(head: Stream<I, T1>, tail: Self) -> Self::Output

Source§

impl<I, T1, T2, T3, T4> StreamTupleCons<I, T1> for (Stream<I, T2>, Stream<I, T3>, Stream<I, T4>)

Source§

type Output = (Stream<I, T1>, Stream<I, T2>, Stream<I, T3>, Stream<I, T4>)

Source§

fn cons(head: Stream<I, T1>, tail: Self) -> Self::Output

Source§

impl<I, T1, T2, T3, T4, T5> StreamTupleCons<I, T1> for (Stream<I, T2>, Stream<I, T3>, Stream<I, T4>, Stream<I, T5>)

Source§

type Output = (Stream<I, T1>, Stream<I, T2>, Stream<I, T3>, Stream<I, T4>, Stream<I, T5>)

Source§

fn cons(head: Stream<I, T1>, tail: Self) -> Self::Output

Source§

impl<I, T1, T2, T3, T4, T5, T6> StreamTupleCons<I, T1> for (Stream<I, T2>, Stream<I, T3>, Stream<I, T4>, Stream<I, T5>, Stream<I, T6>)

Source§

type Output = (Stream<I, T1>, Stream<I, T2>, Stream<I, T3>, Stream<I, T4>, Stream<I, T5>, Stream<I, T6>)

Source§

fn cons(head: Stream<I, T1>, tail: Self) -> Self::Output

Source§

impl<I, T1, T2, T3, T4, T5, T6, T7> StreamTupleCons<I, T1> for (Stream<I, T2>, Stream<I, T3>, Stream<I, T4>, Stream<I, T5>, Stream<I, T6>, Stream<I, T7>)

Source§

type Output = (Stream<I, T1>, Stream<I, T2>, Stream<I, T3>, Stream<I, T4>, Stream<I, T5>, Stream<I, T6>, Stream<I, T7>)

Source§

fn cons(head: Stream<I, T1>, tail: Self) -> Self::Output

Source§

impl<I, T1, T2, T3, T4, T5, T6, T7, T8> StreamTupleCons<I, T1> for (Stream<I, T2>, Stream<I, T3>, Stream<I, T4>, Stream<I, T5>, Stream<I, T6>, Stream<I, T7>, Stream<I, T8>)

Source§

type Output = (Stream<I, T1>, Stream<I, T2>, Stream<I, T3>, Stream<I, T4>, Stream<I, T5>, Stream<I, T6>, Stream<I, T7>, Stream<I, T8>)

Source§

fn cons(head: Stream<I, T1>, tail: Self) -> Self::Output

Implementors§