Signal

object Signal
Companion:
class
class Object
trait Matchable
class Any
Signal.type

Value members

Concrete methods

def combineSeq[A](signals: Seq[Signal[A]]): Signal[Seq[A]]
def fromCustomSource[A](initial: => Try[A], start: (() => A, () => A, GetStartIndex, GetIsStarted) => Unit, stop: StartIndex => Unit): Signal[A]

Easy helper for custom signals. See CustomSignalSource for docs.

Easy helper for custom signals. See CustomSignalSource for docs.

Provide start and stop callbacks that will be called when the signal is started and stopped. E.g. create some resource on start, clean it on stop.

The arguments to start are functions. Call them to do things like update the signal's value, read its current value, or get some info:

getStartIndex returns 1 the first time the signal is started, and is incremented every time it is started again after being stopped.

getIsStarted is a function that you can call any time, including after some delay, to check if the signal is still started, e.g. if you don't want to update the signal's value if the signal is stopped.

Value parameters:
stop

MUST NOT THROW!

def fromFuture[A](future: Future[A])(implicit ec: ExecutionContext): Signal[Option[A]]

The signal will start with None, even if the future is already resolved. Once the future resolves (or after a minimal async delay if it's already resolved), the signal's value will be updated to the future's resolved value.

The signal will start with None, even if the future is already resolved. Once the future resolves (or after a minimal async delay if it's already resolved), the signal's value will be updated to the future's resolved value.

def fromFuture[A](future: Future[A], initial: => A)(implicit ec: ExecutionContext): Signal[A]

The signal will start with the provided initial value, even if the future is already resolved. Once the future resolves (or after a minimal async delay if it's already resolved), the signal's value will be updated to the future's resolved value.

The signal will start with the provided initial value, even if the future is already resolved. Once the future resolves (or after a minimal async delay if it's already resolved), the signal's value will be updated to the future's resolved value.

def fromJsPromise[A](promise: Promise[A]): Signal[Option[A]]

The signal will start with None, even if the promise is already resolved. Once the promise resolves (or after a minimal async delay if it's already resolved), the signal's value will be updated to the promise's resolved value.

The signal will start with None, even if the promise is already resolved. Once the promise resolves (or after a minimal async delay if it's already resolved), the signal's value will be updated to the promise's resolved value.

def fromJsPromise[A](promise: Promise[A], initial: => A): Signal[A]

The signal will start with the provided initial value, even if the promise is already resolved. Once the promise resolves (or after a minimal async delay if it's already resolved), the signal's value will be updated to the promise's resolved value.

The signal will start with the provided initial value, even if the promise is already resolved. Once the promise resolves (or after a minimal async delay if it's already resolved), the signal's value will be updated to the promise's resolved value.

def fromTry[A](value: Try[A]): Val[A]
def fromValue[A](value: A): Val[A]
def nextUpdateId(): Int
def sequence[A](signals: Seq[Signal[A]]): Signal[Seq[A]]

Implicits

Implicits

implicit def toCombinableSignal[A](signal: Signal[A]): CombinableSignal[A]

Provides methods on Signal: combine, combineWith, withCurrentValueOf, sample

Provides methods on Signal: combine, combineWith, withCurrentValueOf, sample

implicit def toDebuggableSignal[A](signal: Signal[A]): DebuggableSignal[A]

Provides signal-specific debug* methods: debugSpyInitialEval, debugLogInitialEval, debugBreakInitialEval

Provides signal-specific debug* methods: debugSpyInitialEval, debugLogInitialEval, debugBreakInitialEval

Provides methods on Signal companion object: combine, combineWith

Provides methods on Signal companion object: combine, combineWith

implicit def toSplittableOneSignal[A](signal: Signal[A]): SplittableOneSignal[A]

Provides methods on Signal: splitOne

Provides methods on Signal: splitOne

implicit def toSplittableOptionSignal[A](signal: Signal[Option[A]]): SplittableOptionSignal[A]

Provides methods on Signal: splitOption

Provides methods on Signal: splitOption

implicit def toSplittableSignal[M[_], Input](signal: Signal[M[Input]]): SplittableSignal[M, Input]

Provides methods on Signal: split, splitByIndex

Provides methods on Signal: split, splitByIndex

implicit def toTupleSignal2[T1, T2](stream: Signal[(T1, T2)]): TupleSignal2[T1, T2]
implicit def toTupleSignal3[T1, T2, T3](stream: Signal[(T1, T2, T3)]): TupleSignal3[T1, T2, T3]
implicit def toTupleSignal4[T1, T2, T3, T4](stream: Signal[(T1, T2, T3, T4)]): TupleSignal4[T1, T2, T3, T4]
implicit def toTupleSignal5[T1, T2, T3, T4, T5](stream: Signal[(T1, T2, T3, T4, T5)]): TupleSignal5[T1, T2, T3, T4, T5]
implicit def toTupleSignal6[T1, T2, T3, T4, T5, T6](stream: Signal[(T1, T2, T3, T4, T5, T6)]): TupleSignal6[T1, T2, T3, T4, T5, T6]
implicit def toTupleSignal7[T1, T2, T3, T4, T5, T6, T7](stream: Signal[(T1, T2, T3, T4, T5, T6, T7)]): TupleSignal7[T1, T2, T3, T4, T5, T6, T7]
implicit def toTupleSignal8[T1, T2, T3, T4, T5, T6, T7, T8](stream: Signal[(T1, T2, T3, T4, T5, T6, T7, T8)]): TupleSignal8[T1, T2, T3, T4, T5, T6, T7, T8]
implicit def toTupleSignal9[T1, T2, T3, T4, T5, T6, T7, T8, T9](stream: Signal[(T1, T2, T3, T4, T5, T6, T7, T8, T9)]): TupleSignal9[T1, T2, T3, T4, T5, T6, T7, T8, T9]