Struct futures::sink::Fanout [] [src]

pub struct Fanout<A, B> where
    A: Sink,
    B: Sink
{ /* fields omitted */ }

Sink that clones incoming items and forwards them to two sinks at the same time.

Backpressure from any downstream sink propagates up, which means that this sink can only process items as fast as its slowest downstream sink.

Methods

impl<A, B> Fanout<A, B> where
    A: Sink,
    B: Sink
[src]

[src]

Consumes this combinator, returning the underlying sinks.

Note that this may discard intermediate state of this combinator, so care should be taken to avoid losing resources when this is called.

Trait Implementations

impl<A, B> Sink for Fanout<A, B> where
    A: Sink,
    B: Sink<SinkItem = <A as Sink>::SinkItem, SinkError = <A as Sink>::SinkError>,
    <A as Sink>::SinkItem: Clone
[src]

The type of value that the sink accepts.

The type of value produced by the sink when an error occurs.

[src]

Attempts to prepare the Sink to receive a value. Read more

[src]

Begin the process of sending a value to the sink. Each call to this function must be proceeded by a successful call to poll_ready which returned Ok(Async::Ready(())). Read more

[src]

Flush any remaining output from this sink. Read more

[src]

Flush any remaining output and close this sink, if necessary. Read more

impl<A, B> Debug for Fanout<A, B> where
    A: Debug + Sink,
    B: Debug + Sink,
    <A as Sink>::SinkItem: Debug,
    <B as Sink>::SinkItem: Debug
[src]

[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<A, B> Send for Fanout<A, B> where
    A: Send,
    B: Send,
    <A as Sink>::SinkItem: Send,
    <B as Sink>::SinkItem: Send

impl<A, B> Sync for Fanout<A, B> where
    A: Sync,
    B: Sync,
    <A as Sink>::SinkItem: Sync,
    <B as Sink>::SinkItem: Sync