Var

class Var[A] extends Base[Pulse[A]] with Source[A] with Signal[A] with Interp[A]

Source signals with imperatively updates.

Type Params
A

Type stored by the signal

S

Struct type used for the propagation of the signal

Companion
object
trait Signal[A]
trait SignalCompat[A]
trait Interp[A]
trait Source[A]
class Base[Pulse[A]]
trait ReSource
class Object
trait Matchable
class Any

Document{}

final
def change(implicit ticket: CreationTicket): Event[Diff[A]]

Create an event that fires every time the signal changes. It fires the tuple (oldVal, newVal) for the signal. Be aware that no change will be triggered when the signal changes to or from empty

Create an event that fires every time the signal changes. It fires the tuple (oldVal, newVal) for the signal. Be aware that no change will be triggered when the signal changes to or from empty

Inherited from
Signal
final
def changed(implicit ticket: CreationTicket): Event[A]

Create an event that fires every time the signal changes. The value associated to the event is the new value of the signal

Create an event that fires every time the signal changes. The value associated to the event is the new value of the signal

Inherited from
Signal
final
def changedTo[V >: A](value: V)(implicit ticket: CreationTicket): Event[Unit]

Convenience function filtering to events which change this reactive to value

Convenience function filtering to events which change this reactive to value

Inherited from
Signal
final
def flatten[R](implicit flatten: Flatten[Signal[A], R]): R

Flattens the inner value.

Flattens the inner value.

Inherited from
Signal
final
def map[B](expression: A => B)(implicit ticket: CreationTicket): Signal[B]

Return a Signal with f applied to the value

Return a Signal with f applied to the value

Inherited from
SignalCompat
final
def now: A

Returns the current value of the signal However, using now is in most cases not what you want. It does not build dependencies, does not integrate into transactions. Use only for examples and debug output.

Returns the current value of the signal However, using now is in most cases not what you want. It does not build dependencies, does not integrate into transactions. Use only for examples and debug output.

Inherited from
Signal
final
def observe(onValue: A => Unit, onError: Throwable => Unit, fireImmediately: Boolean)(implicit ticket: CreationTicket): Observe

add an observer

add an observer

Inherited from
Signal
final

Returns the current value of the signal

Returns the current value of the signal

Inherited from
Signal

Type members

Types

override
type Value = Pulse[A]

Value members

Concrete methods

def admitPulse(pulse: Pulse[A])(implicit ticket: AdmissionTicket): Unit
override
def disconnect()(implicit engine: Scheduler): Unit
Definition Classes
def set(value: A)(implicit fac: Scheduler): Unit
def setEmpty()(implicit fac: Scheduler): Unit
def transform(f: A => A)(implicit fac: Scheduler): Unit

Inherited methods

final
def abortOnError(message: String)(implicit ticket: CreationTicket): Signal[A]
Inherited from
Signal
final
def admit(value: A)(implicit ticket: AdmissionTicket): Unit
Inherited from
Source
override
def interpret(v: Value): A
Definition Classes
Inherited from
Signal
final
def recover[R >: A](onFailure: PartialFunction[Throwable, R])(implicit ticket: CreationTicket): Signal[R]

Uses a partial function onFailure to recover an error carried by the event into a value.

Uses a partial function onFailure to recover an error carried by the event into a value.

Inherited from
Signal
override
def toString: String
Definition Classes
Base -> Any
Inherited from
Base
final
def withDefault[R >: A](value: R)(implicit ticket: CreationTicket): Signal[R]
Inherited from
Signal

Concrete fields

override