Events only propagate a value when they are changing, when the system is at rest, events have no values.
Events only propagate a value when they are changing, when the system is at rest, events have no values.
Note: We hide implicit parameters of the API in the documentation. They are used to ensure correct creation, and you normally do not have to worry about them, except if you accidentally call the implicit parameter list, in which cas you may get cryptic errors. This is a scala limitation. We also hide the internal state parameter of passed and returned events.
Value type of the event occurrences.
Source events with imperative occurrences
Source events with imperative occurrences
Type returned when the event fires
Further implementation of level-based propagation based on the common propagation implementation.
Further implementation of level-based propagation based on the common propagation implementation.
Time changing value derived from the dependencies.
Time changing value derived from the dependencies.
Type stored by the signal
Implementation of the turn handling defined in the Engine trait
Implementation of the turn handling defined in the Engine trait
Transaction type used by the scheduler
State that implements both the buffered pulse and the buffering capabilities itself.
State that implements both the buffered pulse and the buffering capabilities itself.
Abstract propagation definition that defines phases for reactive propagation through dependent reactive elements.
Abstract propagation definition that defines phases for reactive propagation through dependent reactive elements.
Basic implementation of the most fundamental propagation steps as defined by AbstractPropagation.
Basic implementation of the most fundamental propagation steps as defined by AbstractPropagation. Only compatible with spore definitions that store a pulse value and support graph operations.
Source signals with imperatively updates.
Similar to rescala.compat.SignalCompatBundle.Signal expressions, but resulting in an event.
Similar to rescala.compat.SignalCompatBundle.Signal expressions, but resulting in an event. Accessed events return options depending on whether they fire or not, and the complete result of the expression is an event as well.
observers are normale reactives that are configured by a function that converts the value of the input into an ObserveInteract
observers are normale reactives that are configured by a function that converts the value of the input into an ObserveInteract
A signal expression can be used to create signals accessing arbitrary other signals.
A signal expression can be used to create signals accessing arbitrary other signals. Use the apply method on a signal to access its value inside of a signal expression.
val a: Signal[Int] val b: Signal[Int] val result: Signal[String] = Signal { a().toString + b().toString}
Functions to construct signals, you probably want to use signal expressions in rescala.interface.RescalaInterface.Signal for a nicer API.
Functions to construct signals, you probably want to use signal expressions in rescala.interface.RescalaInterface.Signal for a nicer API.
Creates new Vars
Flatten a Signal[Traversable[Event[B]\]\] into a Event[B].
Flatten a Signal[Traversable[Event[B]\]\] into a Event[B]. The new Event fires the value of any inner firing Event. If multiple inner Events fire, the first one in iteration order is selected.
Flatten a Signal[Array[Signal[B]\]\] into a Signal[Array[B]\] where the new Signal updates whenever any of the inner or the outer signal updates
Flatten a Signal[Array[Signal[B]\]\] into a Signal[Array[B]\] where the new Signal updates whenever any of the inner or the outer signal updates
Flatten a Signal[Event[B]]\] into a Event[B] where the new Event fires whenever the current inner event fires
Flatten a Signal[Event[B]]\] into a Event[B] where the new Event fires whenever the current inner event fires
Flatten a Event[Option[B]\] into a Event[B] that fires whenever the inner option is defined.
Flatten a Event[Option[B]\] into a Event[B] that fires whenever the inner option is defined.
Flatten a Signal[Option[Signal[B]\]\] into a Signal[Option[B]\] where the new Signal updates whenever any of the inner or the outer signal updates
Flatten a Signal[Option[Signal[B]\]\] into a Signal[Option[B]\] where the new Signal updates whenever any of the inner or the outer signal updates
Flatten a Signal[Signal[B]\] into a Signal[B] that changes whenever the outer or inner signal changes.
Flatten a Signal[Signal[B]\] into a Signal[B] that changes whenever the outer or inner signal changes.
Executes a transaction.
Executes a transaction.
Result type of the admission function
All inputs that might be changed by the transaction
An admission function that may rescala.operator.Sources.Evt.admit / rescala.operator.Sources.Var.admit arbitrary input changes that will be applied as an atomic transaction at the end.
Result of the admission function
transaction(a, b){ implicit at => a.set(5); b.set(1); at.now(a) }
Executes a transaction with WrapUpPhase.
Executes a transaction with WrapUpPhase.
transaction
Flatten a Signal[Traversable[Event[B]\]\] into a Event[Traversable[Option[B]\]\] where the new Event fires whenever any of the inner events fire
Flatten a Signal[Traversable[Event[B]\]\] into a Event[Traversable[Option[B]\]\] where the new Event fires whenever any of the inner events fire
Flatten a Signal[Traversable[Signal[B]\]\] into a Signal[Traversable[B]\] where the new Signal updates whenever any of the inner or the outer signal updates
Flatten a Signal[Traversable[Signal[B]\]\] into a Signal[Traversable[B]\] where the new Signal updates whenever any of the inner or the outer signal updates
Methods and type aliases for advanced usages, these are most relevant to abstract over multiple scheduler implementations.
REScala has two main abstractions. rescala.default.Event and rescala.default.Signal commonly referred to as reactives. Use rescala.default.Var to create signal sources and rescala.default.Evt to create event sources.
Events and signals can be created from other reactives by using combinators, signals additionally can be created using rescala.default.Signal expressions.