Signal

rescala.operator.SignalBundle.Signal
trait Signal[+T] extends Disconnectable with SignalCompat[T]

Time changing value derived from the dependencies.

Attributes

T

Type stored by the signal

Graph
Supertypes
trait SignalCompat[T]
trait MacroAccess[T, ReadAs[State, T]]
trait ReadAs[State, T]
trait ReSource
class Object
trait Matchable
class Any
Known subtypes
class SignalImpl[T]
class Var[A]

Members list

Concise view

accessor

final def apply(): A

Makes the enclosing reactive expression depend on the current value of the reactive. Is an alias for value.

Makes the enclosing reactive expression depend on the current value of the reactive. Is an alias for value.

Attributes

See also:

value

Inherited from:
MacroAccess
final def now(implicit scheduler: Scheduler[State]): T

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

final def observe(onValue: T => Unit, onError: Throwable => Unit, fireImmediately: Boolean)(implicit ticket: CreationTicket): Disconnectable

add an observer

add an observer

Attributes

final def readValueOnce(implicit scheduler: Scheduler[State]): T

Returns the current value of the signal

Returns the current value of the signal

Attributes

final def value: A

Makes the enclosing reactive expression depend on the current value of the reactive. Is an alias for rescala.macros.MacroAccess.apply.

Makes the enclosing reactive expression depend on the current value of the reactive. Is an alias for rescala.macros.MacroAccess.apply.

Attributes

See also:

apply

Inherited from:
MacroAccess

Signal operators

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

Flattens the inner value.

Flattens the inner value.

Attributes

final inline def map[B](inline expression: T => B)(implicit ct: CreationTicket): Signal[B]

Return a Signal with f applied to the value

Return a Signal with f applied to the value

Attributes

Inherited from:
SignalCompat

Signal to Event conversions

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

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

final def changed(implicit ticket: CreationTicket): Event[T]

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

final def changedTo[V >: T](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

Attributes

internal

override def read(v: Value): T

Interprets the internal type to the external type

Interprets the internal type to the external type

Attributes

Definition Classes

Type members

Types

override type State[V] = State[V]
override type Value <: Pulse[T]

Value members

Concrete methods

final def abortOnError(message: String)(implicit ticket: CreationTicket): Signal[T]
final def recover[R >: T](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.

Attributes

final def withDefault[R >: T](value: R)(implicit ticket: CreationTicket): Signal[R]

Inherited methods

Attributes

Inherited from:
Disconnectable

Attributes

Inherited from:
ReSource