Use this function with caution! This function pipes all of the Observable's emissions into this Sink Using this method is inherently impure and can cause memory leaks, if subscription isn't handled correctly.
Use this function with caution! This function pipes all of the Observable's emissions into this Sink Using this method is inherently impure and can cause memory leaks, if subscription isn't handled correctly. For more guaranteed safety, use Sink.redirect() instead.
Creates a new sink.
Creates a new sink. That sink will transform the values it receives and then forward them along to this sink. The transformation is described by a function from an Observable to another Observable, i.e. an operator on Observable. This function applies the operator to the newly created sink and forwards the value to the original sink.
the type of the resulting sink
the operator to use
the resulting sink, that will forward the values
Creates a new sink.
Creates a new sink. That sink will transform each value it receives and then forward it along to the this sink.
The transformation is a simple map from one type to another, i.e. a 'map'.
This is equivalent to contramap
on a Contravariant
functor, since Sink
s are contravariant in nature.
the type of the resulting sink
the mapping to perform before forwarding
the resulting sink, that will forward the values