[−][src]Struct futures_util::sink::Fanout
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<'a>(
self: Pin<&'a mut Self>
) -> (Pin<&'a mut Si1>, Pin<&'a mut Si2>) where
Si1: Unpin,
Si2: Unpin,
[src][−]
self: Pin<&'a mut Self>
) -> (Pin<&'a mut Si1>, Pin<&'a mut Si2>) where
Si1: Unpin,
Si2: Unpin,
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][+]
Si1: Sink<Item>,
Item: Clone,
Si2: Sink<Item, Error = Si1::Error>,
Auto Trait Implementations
impl<Si1, Si2> Send for Fanout<Si1, Si2> where
Si1: Send,
Si2: Send,
Si1: Send,
Si2: Send,
impl<Si1, Si2> Unpin for Fanout<Si1, Si2> where
Si1: Unpin,
Si2: Unpin,
Si1: Unpin,
Si2: Unpin,
impl<Si1, Si2> Sync for Fanout<Si1, Si2> where
Si1: Sync,
Si2: Sync,
Si1: Sync,
Si2: Sync,
impl<Si1, Si2> UnwindSafe for Fanout<Si1, Si2> where
Si1: UnwindSafe,
Si2: UnwindSafe,
Si1: UnwindSafe,
Si2: UnwindSafe,
impl<Si1, Si2> RefUnwindSafe for Fanout<Si1, Si2> where
Si1: RefUnwindSafe,
Si2: RefUnwindSafe,
Si1: RefUnwindSafe,
Si2: RefUnwindSafe,
Blanket Implementations
impl<T, Item> SinkExt<Item> for T where
T: Sink<Item> + ?Sized,
[src][+]
T: Sink<Item> + ?Sized,
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[+]
V: MultiLane<T>,