final case class ObserverSink[-T](observer: Observer[T]) extends AnyVal with Sink[T] with Product with Serializable
- Alphabetic
- By Inheritance
- ObserverSink
- Serializable
- Serializable
- Product
- Equals
- Sink
- AnyVal
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new ObserverSink(observer: Observer[T])
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
##(): Int
- Definition Classes
- Any
-
def
<--(observable: Observable[T]): AnonymousSubscription
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.
- Definition Classes
- Sink
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
val
observer: Observer[T]
- Definition Classes
- ObserverSink → Sink
-
def
redirect[R](projection: (Observable[R]) ⇒ Observable[T]): Sink[R]
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.
- R
the type of the resulting sink
- projection
the operator to use
- returns
the resulting sink, that will forward the values
- Definition Classes
- Sink
-
def
redirectMap[R](projection: (R) ⇒ T): Sink[R]
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 aContravariant
functor, sinceSink
s are contravariant in nature.- R
the type of the resulting sink
- projection
the mapping to perform before forwarding
- returns
the resulting sink, that will forward the values
- Definition Classes
- Sink