Packages

package core

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. Protected

Type Members

  1. sealed abstract class AirstreamError extends Throwable
  2. trait BaseObservable[+Self[+_] <: Observable[_], +A] extends Source[A] with Named

    This trait represents a reactive value that can be subscribed to.

    This trait represents a reactive value that can be subscribed to.

    It has only one direct subtype, Observable, which in turn has two direct subtypes, EventStream and Signal.

    BaseObservable is the same as Observable, it just lives in a separate trait for technical reasons (the Self type param).

    All Observables are lazy. An Observable starts when it gets its first observer (internal or external), and stops when it loses its last observer (again, internal or external).

    Basic idea: Lazy Observable only holds references to those children that have any observers (either directly on themselves, or on any of their descendants). What this achieves: - Stream only propagates its value to children that (directly or not) have observers - Stream calculates its value only once regardless of how many observers / children it has) (so, all streams are "hot" observables) - Stream doesn't hold references to Streams that no one observes, allowing those Streams to be garbage collected if they are otherwise unreachable (which they should become when their subscriptions are killed by their owners)

  3. trait EventStream[+A] extends Observable[A] with BaseObservable[EventStream, A] with EventSource[A]
  4. trait InternalObserver[-A] extends AnyRef
  5. trait Named extends AnyRef

    This trait lets the user set an ad-hoc name for this instance.

    This trait lets the user set an ad-hoc name for this instance. Used for debugging and tracing.

    Subclasses: BaseObservable, Observer

  6. trait Observable[+A] extends BaseObservable[Observable, A]

    All the interesting stuff is in BaseObservable.

    All the interesting stuff is in BaseObservable. This trait exists only as a sort of type alias for BaseObservable[Observable, A]. (I can't use an actual type alias for this due to an illegal cycle)

  7. trait Observer[-A] extends Sink[A] with Named
  8. final class ObserverList[Obs] extends AnyVal
  9. class Protected extends AnyRef
    Annotations
    @implicitNotFound()
  10. trait Signal[+A] extends Observable[A] with BaseObservable[Signal, A] with SignalSource[A]

    Signal is an Observable with a current value.

  11. trait Sink[-A] extends AnyRef

    A Sink is something that can be converted to an Observer.

    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).

  12. trait Source[+A] extends AnyRef

    A Source is something that can be converted to an Observable.

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

    A Source could be an Observable itself, an EventBus, a Var, or, via implicits, a third party type like Future or ZIO.

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

  13. trait SyncObservable[+A] extends Observable[A]

    Observable that can become pending for the purpose of synchronization - see Transaction for pending logic

  14. class Transaction extends AnyRef

  15. trait WritableEventStream[A] extends EventStream[A] with WritableObservable[A]
  16. trait WritableObservable[A] extends Observable[A]
  17. trait WritableSignal[A] extends Signal[A] with WritableObservable[A]

Value Members

  1. object AirstreamError extends Serializable
  2. object BaseObservable
  3. object EventStream
  4. object InternalObserver
  5. object Observable
  6. object Observer
  7. object Protected
  8. object Signal
  9. object Sink
  10. object Source
  11. object Transaction

Ungrouped