Var

reactives.operator.Var
See theVar companion object
class Var[A] extends Base[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[Pulse[A]]
trait ReSource
class Object
trait Matchable
class Any
Show all

Members list

Grouped members

conversion

final def change(using ticket: CreationTicket[State]): 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(using ticket: CreationTicket[State]): 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: 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 def observe(onValue: A => Unit, onError: (Throwable => Unit) | Null, fireImmediately: Boolean)(using ticket: CreationTicket[State]): Disconnectable

add an observer

add an observer

Attributes

Inherited from:
Signal
final def readValueOnce: 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](using flatten: Flatten[Signal[A], R]): R

Flattens the inner value.

Flattens the inner value.

Attributes

Inherited from:
Signal
final inline def map[B](inline expression: A => B)(using CreationTicket[State]): 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)(using ticket: CreationTicket[State]): 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]

The type of the time-changing Value contained in this ReSource

The type of the time-changing Value contained in this ReSource

Attributes

Inherited types

override type State[V] = ParRPState[V]

Additional structure required by schedulers for their propagation. For example, outgoing dependencies, multi-versioned values, locks.

Additional structure required by schedulers for their propagation. For example, outgoing dependencies, multi-versioned values, locks.

Attributes

Inherited from:
Signal

Value members

Concrete methods

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

Attributes

Definition Classes
def set(value: A)(using planTransactionScope: PlanTransactionScope[State]): Unit
def setEmpty()(using fac: Scheduler[State]): Unit
def transform(f: A => A)(using planTransactionScope: PlanTransactionScope[State]): Unit

Inherited methods

final def abortOnError(message: String)(using ticket: CreationTicket[State]): 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)(using ticket: AdmissionTicket[State]): Unit

Attributes

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

Developer friendly information about the resource.

Developer friendly information about the resource.

Attributes

Inherited from:
Base

Givens

Inherited givens

given given_Conversion_Value_T: Conversion[Value, A]

Attributes

Inherited from:
Signal