com.raquo.airstream.debug

Type members

Classlikes

class DebuggableObservable[Self <: (Observable), +A](val observable: BaseObservable[Self, A])

This implicit class provides debug* methods for observables, e.g.:

This implicit class provides debug* methods for observables, e.g.:

stream.debugWithName("MyStream").debugSpyStarts().debugLogEvents()

The result of the chain is an observable that you should use in place of the original observable (stream in this case).

The implicit conversion to this class is defined in the Observable companion object.

This is not a value class because DebuggableSignal needs to extend this. The performance penalty of one extra instantiation per debugged stream should not be noticeable.

final class DebuggableObserver[A](val observer: Observer[A]) extends AnyVal

This implicit class provides debug* methods for observers.

This implicit class provides debug* methods for observers.

Every debug* method creates a new observer that performs the specified behaviour and then calls the original observer.

Note: type inference doesn't work on Observer debug* methods, so you need to provide the AA type param (it should be same as A).

class DebuggableSignal[+A](val observable: Signal[A]) extends DebuggableObservable[Signal, A]

This implicit class provides Signal-specific debug* methods, e.g.:

This implicit class provides Signal-specific debug* methods, e.g.:

signal.debugLogInitialEval().debugLog()

See DebuggableObservable and the docs for details.

The implicit conversion to this class is defined in the Signal companion object.

This is not a value class because it needs to extend DebuggableObservable. The performance penalty of one extra instantiation per debugged stream should not be noticeable.

class DebuggableStream[+A](val observable: EventStream[A]) extends DebuggableObservable[EventStream, A]

This class exists for type inference purposes only (see "observable debugger type inference" test in DebugSpec), the real meat is in DebuggableObservable.

This class exists for type inference purposes only (see "observable debugger type inference" test in DebugSpec), the real meat is in DebuggableObservable.

case class Debugger[-A](onStart: () => Unit, onStop: () => Unit, onFire: Try[A] => Unit, onEvalFromParent: Try[A] => Unit)

Debugger for observables

Debugger for observables

Value parameters:
onEvalFromParent

Only for signals. Fired when signal calls currentValueFromParent, which happens 1) when the signal is first started and its initial value is evaluated, AND 2) also when the signal is re-started after being stopped, when that method is called to re-sync this signal's value with the parent. #TODO[Integrity]: I'm not 100% sure if this hook reports correctly. - It actually reports the debugger signal's own calls to currentValueFromParent and I'm not 100% sure that they match with the parent's calls. I think they should match, at least if parent signal is always used via its debug signal, but to be honest I'm not really sure.

See DebuggableObservable and DebuggableSignal for user-facing debug methods

See DebuggableObservable and DebuggableSignal for user-facing debug methods

Companion:
object
Companion:
class
class DebuggerObserver[A](parent: Observer[A], debug: Try[A] => Unit) extends Observer[A]

See DebuggableObserver for user-facing debug methods

See DebuggableObserver for user-facing debug methods

class DebuggerSignal[A](val parent: Signal[A], val debugger: Debugger[A]) extends SingleParentSignal[A, A] with DebuggerObservable[A]

See DebuggableObservable and DebuggableSignal for user-facing debug methods

See DebuggableObservable and DebuggableSignal for user-facing debug methods

class DebuggerStream[A](val parent: EventStream[A], val debugger: Debugger[A]) extends SingleParentStream[A, A] with DebuggerObservable[A]

See DebuggableObservable and DebuggableSignal for user-facing debug methods

See DebuggableObservable and DebuggableSignal for user-facing debug methods