[][src]Struct futures_util::sink::Fanout

#[must_use = "sinks do nothing unless polled"]pub struct Fanout<Si1, Si2> { /* fields omitted */ }
This is supported on crate feature sink only.

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.

Implementations

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 Self>) -> (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: Debug, Si2: Debug> Debug for Fanout<Si1, Si2>[src]

impl<Si1, Si2, Item> Sink<Item> for Fanout<Si1, Si2> where
    Si1: Sink<Item>,
    Item: Clone,
    Si2: Sink<Item, Error = Si1::Error>, 
[src]

type Error = Si1::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
[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
[src]

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

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

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

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

impl<T, Item> SinkExt<Item> for T where
    T: Sink<Item> + ?Sized
[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.