Signal

trait Signal[+T] extends Disconnectable with SignalCompat[T]

Time changing value derived from the dependencies.

Type Params
S

Struct type used for the propagation of the signal

T

Type stored by the signal

trait SignalCompat[T]
trait Interp[T]
trait ReSource
class Object
trait Matchable
class Any
class SignalImpl[T]
class Var[A]

Document{}

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

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

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

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

Flattens the inner value.

Flattens the inner value.

final
def map[B](expression: T => 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: 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.

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

add an observer

add an observer

final

Returns the current value of the signal

Returns the current value of the signal

Type members

Types

override
type Value <: Pulse[T]

Value members

Concrete methods

final
def abortOnError(message: String)(implicit ticket: CreationTicket): Signal[T]
override
def interpret(v: Value): T
Definition Classes
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.

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

Inherited methods

def disconnect()(implicit engine: Scheduler): Unit
Inherited from
Disconnectable