[−][src]Trait futuristic::sink::SinkTools
Extension trait for Sink
.
Provided methods
fn fork<V, O, F, U>(self, other: O, switch: F) -> Fork<V, Self, O, F, T, U> where
Self: Sized,
F: FnMut(V) -> Either<T, U>,
O: Sink<U, Error = Self::Error>,
Self: Sized,
F: FnMut(V) -> Either<T, U>,
O: Sink<U, Error = Self::Error>,
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
.