Sink

com.raquo.airstream.core.Sink
See theSink companion object
trait Sink[-A]

A Sink is something that can be converted to an Observer. The counterparty to Sink is a Source, something that can be converted to an Observable.

A Sink could be an Observer itself, an EventBus, a Var, or, via implicits, an external type like js.Function1.

The point of using Sink instead of Observer in your API is to let the end users pass simply eventBus instead of eventBus.writer to a method that requires Sink, and to achieve that without having an implicit conversion from EventBus to Observer, because then you'd also want an implicit conversion from EventBus to Observable, and those two would be incompatible (e.g. both Observable and Observer have a filter method).

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Observer[A]
class DebuggerObserver[A]
class WriteBus[A]
class EventBus[A]
trait Var[A]
class DerivedVar[A, B]
class SourceVar[A]
Show all

Members list

Value members

Abstract methods