com.raquo.airstream.core
Members list
Type members
Classlikes
Attributes
- Companion
- object
- Supertypes
-
class Throwabletrait Serializableclass Objecttrait Matchableclass Any
- Known subtypes
-
class CombinedErrorclass DebugErrorclass ErrorHandlingErrorclass ObserverErrorclass TransactionDepthExceededclass VarErrorShow all
Attributes
- Companion
- class
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
AirstreamError.type
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)
Attributes
- Companion
- object
- Supertypes
- Known subtypes
-
trait EventStream[A]trait WritableStream[A]class MergeStream[A]class DebuggerStream[A]class DistinctStream[A]class DropStream[A]class FilterStream[A]class StreamFromSignal[A]class TakeStream[A]class DebounceStream[A]class DelayStream[A]class SyncDelayStream[A]class ThrottleStream[A]class CustomStreamSource[A]class EventBusStream[A]class ConcurrentStream[A]class SwitchSignalStream[A]class JsPromiseStream[A]class PeriodicStream[A]class AjaxStreamclass FetchStreamtrait Observable[A]trait Signal[A]trait WritableSignal[A]class DebuggerSignal[A]class DistinctSignal[A]class ObservedSignal[A]class SignalFromStream[A]class CustomSignalSource[A]class SwitchSignal[A]class Val[A]class JsPromiseSignal[A]trait StrictSignal[A]trait OwnedSignal[A]trait SyncObservable[A]trait CombineObservable[A]trait WritableObservable[A]trait CustomSource[A]Show all
Attributes
- Companion
- trait
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
BaseObservable.type
Attributes
- Companion
- object
- Supertypes
-
trait EventSource[A]trait Observable[A]trait Namedtrait Source[A]class Objecttrait Matchableclass AnyShow all
- Known subtypes
-
trait WritableStream[A]class MergeStream[A]class DebuggerStream[A]class DistinctStream[A]class DropStream[A]class FilterStream[A]class StreamFromSignal[A]class TakeStream[A]class DebounceStream[A]class DelayStream[A]class SyncDelayStream[A]class ThrottleStream[A]class CustomStreamSource[A]class EventBusStream[A]class ConcurrentStream[A]class SwitchSignalStream[A]class JsPromiseStream[A]class PeriodicStream[A]class AjaxStreamclass FetchStreamShow all
Attributes
- Companion
- trait
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
EventStream.type
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
trait InternalNextErrorObserver[A]class EventBusStream[A]class ConcurrentStream[A]class DropStream[A]class FilterStream[A]class TakeStream[A]class DelayStream[A]trait InternalParentObserver[A]trait InternalTryObserver[A]class DebuggerSignal[A]class DistinctSignal[A]class ObservedSignal[A]class SignalFromStream[A]trait DebuggerObservable[A]class DebuggerStream[A]class DistinctStream[A]class SwitchSignal[A]class SwitchSignalStream[A]class StreamFromSignal[A]class DebounceStream[A]class SyncDelayStream[A]class ThrottleStream[A]Show all
Attributes
- Companion
- trait
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
InternalObserver.type
This trait lets the user set an ad-hoc name for this instance. Used for debugging and tracing.
This trait lets the user set an ad-hoc name for this instance. Used for debugging and tracing.
Subclasses: BaseObservable, Observer
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
trait EventStream[A]trait WritableStream[A]class MergeStream[A]class DebuggerStream[A]class DistinctStream[A]class DropStream[A]class FilterStream[A]class StreamFromSignal[A]class TakeStream[A]class DebounceStream[A]class DelayStream[A]class SyncDelayStream[A]class ThrottleStream[A]class CustomStreamSource[A]class EventBusStream[A]class ConcurrentStream[A]class SwitchSignalStream[A]class JsPromiseStream[A]class PeriodicStream[A]class AjaxStreamclass FetchStreamtrait Observable[A]trait Signal[A]trait WritableSignal[A]class DebuggerSignal[A]class DistinctSignal[A]class ObservedSignal[A]class SignalFromStream[A]class CustomSignalSource[A]class SwitchSignal[A]class Val[A]class JsPromiseSignal[A]trait StrictSignal[A]trait OwnedSignal[A]trait SyncObservable[A]trait CombineObservable[A]trait WritableObservable[A]trait CustomSource[A]trait Observer[A]class DebuggerObserver[A]class WriteBus[A]class EventBus[A]trait Var[A]class SourceVar[A]Show all
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)
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)
Attributes
- Companion
- object
- Supertypes
- Known subtypes
-
trait EventStream[A]trait WritableStream[A]class MergeStream[A]class DebuggerStream[A]class DistinctStream[A]class DropStream[A]class FilterStream[A]class StreamFromSignal[A]class TakeStream[A]class DebounceStream[A]class DelayStream[A]class SyncDelayStream[A]class ThrottleStream[A]class CustomStreamSource[A]class EventBusStream[A]class ConcurrentStream[A]class SwitchSignalStream[A]class JsPromiseStream[A]class PeriodicStream[A]class AjaxStreamclass FetchStreamtrait Signal[A]trait WritableSignal[A]class DebuggerSignal[A]class DistinctSignal[A]class ObservedSignal[A]class SignalFromStream[A]class CustomSignalSource[A]class SwitchSignal[A]class Val[A]class JsPromiseSignal[A]trait StrictSignal[A]trait OwnedSignal[A]trait SyncObservable[A]trait CombineObservable[A]trait WritableObservable[A]trait CustomSource[A]Show all
Attributes
- Companion
- trait
- Supertypes
- Self type
-
Observable.type
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
object Observable.type
Attributes
- Companion
- object
- Supertypes
- Known subtypes
-
class DebuggerObserver[A]class WriteBus[A]
Attributes
- Supertypes
-
class AnyValtrait Matchableclass Any
Signal is an Observable with a current value.
Signal is an Observable with a current value.
Attributes
- Companion
- object
- Supertypes
-
trait SignalSource[A]trait Observable[A]trait Namedtrait Source[A]class Objecttrait Matchableclass AnyShow all
- Known subtypes
-
trait WritableSignal[A]class DebuggerSignal[A]class DistinctSignal[A]class ObservedSignal[A]class SignalFromStream[A]class CustomSignalSource[A]class SwitchSignal[A]class Val[A]class JsPromiseSignal[A]trait StrictSignal[A]trait OwnedSignal[A]Show all
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 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
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 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).
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
trait EventStream[A]trait WritableStream[A]class MergeStream[A]class DebuggerStream[A]class DistinctStream[A]class DropStream[A]class FilterStream[A]class StreamFromSignal[A]class TakeStream[A]class DebounceStream[A]class DelayStream[A]class SyncDelayStream[A]class ThrottleStream[A]class CustomStreamSource[A]class EventBusStream[A]class ConcurrentStream[A]class SwitchSignalStream[A]class JsPromiseStream[A]class PeriodicStream[A]class AjaxStreamclass FetchStreamtrait Observable[A]trait Signal[A]trait WritableSignal[A]class DebuggerSignal[A]class DistinctSignal[A]class ObservedSignal[A]class SignalFromStream[A]class CustomSignalSource[A]class SwitchSignal[A]class Val[A]class JsPromiseSignal[A]trait StrictSignal[A]trait OwnedSignal[A]trait SyncObservable[A]trait CombineObservable[A]trait WritableObservable[A]trait CustomSource[A]trait EventSource[A]class EventBus[A]trait SignalSource[A]trait Var[A]class SourceVar[A]Show all
Observable that can become pending for the purpose of synchronization - see Transaction for pending logic
Observable that can become pending for the purpose of synchronization - see Transaction for pending logic
Attributes
- Supertypes
- Known subtypes
Transaction is a moment in time during which Airstream guarantees no FRP glitches.
Transaction is a moment in time during which Airstream guarantees no FRP glitches.
Some observables need to emit their events in new transactions. Roughly speaking:
- All async observables (e.g. delay(100))
- All observables that can create loops in the observable graph (e.g. flatMapSwitch)
- All observables that get their events from outside of Airstream (e.g. custom sources)
An observable can only emit once in a given transaction.
- See MergeStream or CustomSource for examples of handling that.
See the docs for more details.
Value parameters
- code
-
Note: Must not throw!
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Transaction.type
Attributes
- Supertypes
- Known subtypes
-
trait WritableSignal[A]class DebuggerSignal[A]class DistinctSignal[A]class ObservedSignal[A]class SignalFromStream[A]class CustomSignalSource[A]class SwitchSignal[A]class Val[A]class JsPromiseSignal[A]trait WritableStream[A]class MergeStream[A]class DebuggerStream[A]class DistinctStream[A]class DropStream[A]class FilterStream[A]class StreamFromSignal[A]class TakeStream[A]class DebounceStream[A]class DelayStream[A]class SyncDelayStream[A]class ThrottleStream[A]class CustomStreamSource[A]class EventBusStream[A]class ConcurrentStream[A]class SwitchSignalStream[A]class JsPromiseStream[A]class PeriodicStream[A]class AjaxStreamclass FetchStreamtrait CustomSource[A]Show all
Attributes
- Supertypes
-
trait WritableObservable[A]trait Signal[A]trait SignalSource[A]trait Observable[A]trait Namedtrait Source[A]class Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class DebuggerSignal[A]class DistinctSignal[A]class ObservedSignal[A]class SignalFromStream[A]class CustomSignalSource[A]class SwitchSignal[A]class Val[A]class JsPromiseSignal[A]Show all
Attributes
- Supertypes
-
trait WritableObservable[A]trait EventStream[A]trait EventSource[A]trait Observable[A]trait Namedtrait Source[A]class Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class MergeStream[A]class DebuggerStream[A]class DistinctStream[A]class DropStream[A]class FilterStream[A]class StreamFromSignal[A]class TakeStream[A]class DebounceStream[A]class DelayStream[A]class SyncDelayStream[A]class ThrottleStream[A]class CustomStreamSource[A]class EventBusStream[A]class ConcurrentStream[A]class SwitchSignalStream[A]class JsPromiseStream[A]class PeriodicStream[A]class AjaxStreamclass FetchStreamShow all