[−][src]Trait futuristic::sink::SinkTools
Extension trait for Sink
.
Provided methods
fn fork<T, O, F>(self, other: O, switch: F) -> Fork<T, Self, O, F> where
Self: Sized,
F: FnMut(T) -> Either<Self::SinkItem, O::SinkItem>,
O: Sink<SinkError = Self::SinkError>,
Self: Sized,
F: FnMut(T) -> Either<Self::SinkItem, O::SinkItem>,
O: Sink<SinkError = Self::SinkError>,
Returns a sink that dispatches to self
or other
.
Every item sent to the returned sink is passed to switch
and the
returned value is sent to one of the underlying sinks. Left
values
are sent to self
while Right
values are sent to other
.