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

#[must_use = "sinks do nothing unless polled"]
pub struct Fanout<Si1, Si2> { /* 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<Si1, Si2> Fanout<Si1, Si2>[src]

pub fn get_ref(&self) -> (&Si1, &Si2)[src]

Get a shared reference to the inner sinks.

pub fn get_mut(&mut self) -> (&mut Si1, &mut Si2)[src]

Get a mutable reference to the inner sinks.

pub fn get_pin_mut(
    self: Pin<&mut Fanout<Si1, Si2>>
) -> (Pin<&mut Si1>, Pin<&mut Si2>)
[src]

Get a pinned mutable reference to the inner sinks.

pub fn into_inner(self) -> (Si1, Si2)[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<Si1, Si2, Item> Sink<Item> for Fanout<Si1, Si2> where
    Item: Clone,
    Si1: Sink<Item>,
    Si2: Sink<Item, Error = <Si1 as Sink<Item>>::Error>, 
[src]

type Error = <Si1 as Sink<Item>>::Error

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

impl<Si1, Si2> Debug for Fanout<Si1, Si2> where
    Si1: Debug,
    Si2: Debug
[src]

Auto Trait Implementations

impl<Si1, Si2> Send for Fanout<Si1, Si2> where
    Si1: Send,
    Si2: Send

impl<Si1, Si2> Unpin for Fanout<Si1, Si2> where
    Si1: Unpin,
    Si2: Unpin

impl<Si1, Si2> Sync for Fanout<Si1, Si2> where
    Si1: Sync,
    Si2: Sync

impl<Si1, Si2> UnwindSafe for Fanout<Si1, Si2> where
    Si1: UnwindSafe,
    Si2: UnwindSafe

impl<Si1, Si2> RefUnwindSafe for Fanout<Si1, Si2> where
    Si1: RefUnwindSafe,
    Si2: RefUnwindSafe

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, Item> SinkExt<Item> for T where
    T: Sink<Item> + ?Sized
[src]