[][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.


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>)

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> Debug for Fanout<Si1, Si2> where
    Si1: Debug,
    Si2: Debug

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>, 

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

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

impl<'pin, Si1, Si2> Unpin for Fanout<Si1, Si2> where
    __Fanout<'pin, Si1, Si2>: Unpin

impl<Si1, Si2> UnsafeUnpin for Fanout<Si1, Si2>[src]

Auto Trait Implementations

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

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

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

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

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

impl<T, U> Into<U> for T where
    U: From<T>, 

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

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

The type returned in the event of a conversion error.