Var

rescala.operator.SourceBundle.Var
See theVar companion object
class Var[A] extends Base[BundleState, Pulse[A]], Source[A], Signal[A]

Source signals with imperatively updates.

Type parameters

A

Type stored by the signal

Attributes

Companion
object
Graph
Supertypes
trait Signal[A]
trait MacroAccess[A]
trait ReadAs[A]
trait Source[A]
class Base[BundleState, Pulse[A]]
trait ReSource
class Object
trait Matchable
class Any
Show all

Members list

Grouped members

internal

override def read(v: Value): A

Interprets the internal type to the external type

Interprets the internal type to the external type

Attributes

Definition Classes
Inherited from:
Signal

conversion

final def change(implicit ticket: CreationTicket[State]): SignalBundle.this.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

Attributes

Inherited from:
Signal
final def changed(implicit ticket: CreationTicket[State]): SignalBundle.this.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

Attributes

Inherited from:
Signal

accessor

final def now(implicit scheduler: Scheduler[State]): 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.

Attributes

Inherited from:
Signal
final infix def observe(onValue: A => Unit, onError: Throwable => Unit, fireImmediately: Boolean)(implicit ticket: CreationTicket[State]): Disconnectable

add an observer

add an observer

Attributes

Inherited from:
Signal
final def readValueOnce(implicit scheduler: Scheduler[State]): A

Returns the current value of the signal

Returns the current value of the signal

Attributes

Inherited from:
Signal
final def value: A

Makes the enclosing reactive expression depend on the current value of the reactive.

Makes the enclosing reactive expression depend on the current value of the reactive.

Attributes

See also

apply

Inherited from:
MacroAccess

operator

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

Flattens the inner value.

Flattens the inner value.

Attributes

Inherited from:
Signal
final infix inline def map[B](using CreationTicket[State])(inline expression: A => B): SignalBundle.this.Signal[B]

Return a Signal with f applied to the value

Return a Signal with f applied to the value

Attributes

Inherited from:
Signal
final def withDefault[R >: A](value: R)(implicit ticket: CreationTicket[State]): SignalBundle.this.Signal[R]

Sets a default value in case this signal is empty.

Sets a default value in case this signal is empty.

Attributes

Inherited from:
Signal

Type members

Types

override type Value = Pulse[A]

Inherited types

override type State[V] = SignalBundle.this.BundleState[V]

Attributes

Inherited from:
Signal

Value members

Concrete methods

def admitPulse(pulse: Pulse[A])(implicit ticket: AdmissionTicket[State]): Unit
override def disconnect(): Unit

Attributes

Definition Classes
infix def set(value: A)(implicit sched: Scheduler[State], scopeSearch: ScopeSearch[State]): Unit
def setEmpty()(implicit fac: Scheduler[State]): Unit
def transform(f: A => A)(implicit sched: Scheduler[State], scopeSearch: ScopeSearch[State]): Unit

Inherited methods

final def abortOnError(message: String)(implicit ticket: CreationTicket[State]): SignalBundle.this.Signal[A]

Adds another error message in case this signal is empty, also disallows handling exceptions in observers

Adds another error message in case this signal is empty, also disallows handling exceptions in observers

Attributes

Inherited from:
Signal
final def admit(value: A)(implicit ticket: AdmissionTicket[State]): Unit

Attributes

Inherited from:
Source
final def recover[R >: A](onFailure: PartialFunction[Throwable, R])(implicit ticket: CreationTicket[State]): SignalBundle.this.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.

Attributes

Inherited from:
Signal
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Base -> Any
Inherited from:
Base

Inherited fields

override val info: ReInfo

Attributes

Inherited from:
Base

Givens

Inherited givens

given given_Conversion_Value_T: Conversion[Value, A]

Attributes

Inherited from:
Signal