package signal
- Alphabetic
- Public
- Protected
Type Members
- class CombineSignal2[A, B, O] extends Signal[O] with CombineObservable[O]
- class FoldLeftSignal[A, B] extends Signal[B] with SingleParentObservable[A, B] with InternalTryObserver[A]
Note: In folds, failure is often toxic to all subsequent events.
Note: In folds, failure is often toxic to all subsequent events. You often can not satisfactorily recover from a failure downstream because you will not have access to previous non-failed state in
fn
Therefore, make sure to handle recoverable errors infn
. - class FutureSignal[A] extends StrictSignal[Option[A]]
This signal behaves a bit differently than other signals typically do: it keeps track of state regardless of whether it is started.
This signal behaves a bit differently than other signals typically do: it keeps track of state regardless of whether it is started. This is possible because this case requires no special memory management.
Note that being a StrictSignal, this exposes
now
andtryNow
methods, however if thefuture
was not yet completed when this signal was created, this signal's current value will be updated *asynchronously* after the future has completed. - class MapSignal[I, +O] extends Signal[O] with SingleParentObservable[I, O] with InternalTryObserver[I]
This signal emits an error if the parent observable emits an error or if
project
throwsThis signal emits an error if the parent observable emits an error or if
project
throwsIf
recover
is defined and needs to be called, it can do the following: - Return Some(value) to make this signal emit value - Return None to make this signal ignore (swallow) this error - Not handle the error (meaning .isDefinedAt(error) must be false) to emit the original error - trait Signal[+A] extends Observable[A]
Signal is an Observable with a current value.
- class SignalFromEventStream[A] extends Signal[A] with SingleParentObservable[A, A] with InternalTryObserver[A]
- class SignalViewer[+A] extends MapSignal[Any, A] with StrictSignal[A]
This class adds a noop observer to
signal
, ensuring that its current value is computed.This class adds a noop observer to
signal
, ensuring that its current value is computed. It then lets you querysignal
's current value withnow
andtryNow
methods (see StrictSignal). - final class SplittableOneSignal[Input] extends AnyVal
- final class SplittableSignal[M[_], Input] extends AnyVal
- trait StrictSignal[+A] extends Signal[A]
A Signal that lets you directly query its current value.
A Signal that lets you directly query its current value.
This means that its current value is kept up to date regardless of observers. How this is actually accomplished is up to the concrete class extending this trait.
- class SwitchSignal[A] extends Signal[A] with SingleParentObservable[Signal[A], A] with InternalTryObserver[Signal[A]]
This flattens a Signal[ Signal[A] ] into a Signal[A]
This flattens a Signal[ Signal[A] ] into a Signal[A]
When this signal is started, its current value tracks the current value of the last signal emitted by
parent
.This signal follows standard signal mechanics: - It adds an internal observer to the signal that it's currently tracking while it's tracking it. - It does not update when it is stopped, even if the signal being tracked is not stopped (e.g. if it has other observers). - So if you want a consistent value out of this signal, keep it observed.
- final class Tuple2Signal[A, B] extends AnyVal
- class Val[A] extends StrictSignal[A]
- class Var[A] extends AnyRef
Var is a container for a Writeable Signal – sort of like EventBus, but for Signals.
Var is a container for a Writeable Signal – sort of like EventBus, but for Signals.
Note that while this Var and its signal itself are strict – that is, their currentValue will update regardless of whether the Var's
signal
has any observers, this new value will not propagate anywhere if the signal has no observers, obviously.