com.raquo.airstream.state

Members list

Type members

Classlikes

class DerivedVar[A, B](parent: Var[A], zoomIn: A => B, zoomOut: (A, B) => A, owner: Owner, displayNameSuffix: String) extends Var[B]

DerivedVar has the same Var contract as SourceVar, but instead of maintaining its own state it is essentially a lens on the underlying SourceVar.

DerivedVar has the same Var contract as SourceVar, but instead of maintaining its own state it is essentially a lens on the underlying SourceVar.

This Var is active for as long as its signal has listeners. Being a StrictSignal, it already starts out with a subscription owned by owner, but even if owner kills its subscriptions, this Var's signal might have other listeners.

Attributes

Supertypes
trait Var[B]
trait Named
trait Sink[B]
trait SignalSource[B]
trait Source[B]
class Object
trait Matchable
class Any
Show all
class DerivedVarSignal[A, B](parent: Var[A], zoomIn: A => B, owner: Owner, parentDisplayName: => String) extends MapSignal[A, B], OwnedSignal[B]

Attributes

Supertypes
trait OwnedSignal[B]
trait StrictSignal[B]
class MapSignal[A, B]
trait SingleParentSignal[A, B]
trait InternalObserver[A]
trait WritableSignal[B]
trait Signal[B]
trait SignalSource[B]
trait Observable[B]
trait Named
trait Source[B]
class Object
trait Matchable
class Any
Show all
class ObservedSignal[A](val parent: Signal[A], observer: Observer[A], owner: Owner) extends MapSignal[A, A], OwnedSignal[A]

This class adds a noop observer to signal, ensuring that its current value is computed. It then lets you query signal's current value with now and tryNow methods (see StrictSignal), as well as kill the subscription (see OwnedSignal)

This class adds a noop observer to signal, ensuring that its current value is computed. It then lets you query signal's current value with now and tryNow methods (see StrictSignal), as well as kill the subscription (see OwnedSignal)

Attributes

Supertypes
trait OwnedSignal[A]
trait StrictSignal[A]
class MapSignal[A, A]
trait SingleParentSignal[A, A]
trait InternalObserver[A]
trait WritableSignal[A]
trait Signal[A]
trait SignalSource[A]
trait Observable[A]
trait Named
trait Source[A]
class Object
trait Matchable
class Any
Show all
trait OwnedSignal[+A] extends StrictSignal[A]

Attributes

Supertypes
trait StrictSignal[A]
trait Signal[A]
trait SignalSource[A]
trait Observable[A]
trait Named
trait Source[A]
class Object
trait Matchable
class Any
Show all
Known subtypes
class DerivedVarSignal[A, B]
class ObservedSignal[A]
class SourceVar[A] extends Var[A]

The regular Var that's created with Var.apply.

The regular Var that's created with Var.apply.

See also DerivedVar, created with myVar.zoom(a => b)(b => a)(owner)

Attributes

Supertypes
trait Var[A]
trait Named
trait Sink[A]
trait SignalSource[A]
trait Source[A]
class Object
trait Matchable
class Any
Show all
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.

Attributes

Supertypes
trait Signal[A]
trait SignalSource[A]
trait Observable[A]
trait Named
trait Source[A]
class Object
trait Matchable
class Any
Show all
Known subtypes
trait OwnedSignal[A]
class DerivedVarSignal[A, B]
class ObservedSignal[A]
class Val[A]
class Val[A](constantValue: Try[A]) extends WritableSignal[A], StrictSignal[A]

Attributes

Companion
object
Supertypes
trait StrictSignal[A]
trait WritableSignal[A]
trait Signal[A]
trait SignalSource[A]
trait Observable[A]
trait Named
trait Source[A]
class Object
trait Matchable
class Any
Show all
object Val

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
Val.type
trait Var[A] extends SignalSource[A], Sink[A], Named

Var is essentially a Signal that you can write to, so it's a source of state, like EventBus is a source of events.

Var is essentially a Signal that you can write to, so it's a source of state, like EventBus is a source of events.

There are two kinds of Vars: SourceVar and DerivedVar. The latter you can obtain by calling zoom on any Var, however, unlike SourceVar, DerivedVar requires an Owner in order to run.

Attributes

Companion
object
Supertypes
trait Named
trait Sink[A]
trait SignalSource[A]
trait Source[A]
class Object
trait Matchable
class Any
Show all
Known subtypes
class DerivedVar[A, B]
class SourceVar[A]
object Var

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
Var.type