stream_fusion

Trait Consumer

Source
pub trait Consumer<I>:
    'static
    + Clone
    + Send {
    type Return: 'static + Send;

    // Required methods
    fn consume(&mut self, input: Step<I>) -> Step<()>;
    fn take(self) -> Self::Return;
}

Required Associated Types§

Source

type Return: 'static + Send

Required Methods§

Source

fn consume(&mut self, input: Step<I>) -> Step<()>

Source

fn take(self) -> Self::Return

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<Acc, F> Consumer<Acc> for Reduce<Acc, F>
where Acc: 'static + Send + Clone, F: 'static + Fn(Acc, Acc) -> Acc + Send + Clone,

Source§

impl<I> Consumer<I> for Never