Pulse

object Pulse

Object containing utility functions for using pulses

Companion
class
trait Sum
trait Mirror
class Object
trait Matchable
class Any

Type members

Classlikes

sealed
trait Change[+P] extends Pulse[P]
final case
class Exceptional(throwable: Throwable) extends Change[Nothing]

Pulse indicating an exception

Pulse indicating an exception

case
object NoChange extends Pulse[Nothing]

Pulse indicating no change

Pulse indicating no change

final case
class Value[+P](update: P) extends Change[P]

Pulse indicating a change

Pulse indicating a change

Value Params
update

Updated value stored by the pulse

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Inherited from
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Inherited from
Mirror

Value members

Concrete methods

def diffPulse[P](newValue: P, oldPulse: Pulse[P]): Pulse[P]

Transforms the given pulse and an updated value into a pulse indicating a change from the pulse's value to the given updated value.

Transforms the given pulse and an updated value into a pulse indicating a change from the pulse's value to the given updated value.

def fromOption[P](opt: Option[P]): Pulse[P]

Transforms an optional value into a pulse. If the option doesn't contain a value, an empty pulse indicating no change is returned. Otherwise, a pulse with the option's value set as updated value is returned.

Transforms an optional value into a pulse. If the option doesn't contain a value, an empty pulse indicating no change is returned. Otherwise, a pulse with the option's value set as updated value is returned.

Type Params
P

Value type of both option and returned pulse

Value Params
opt

Option to transform into a pulse

Returns

Pulse with the option's value set as updated value, or an empty pulse if the option doesn't have a value.

def fromTry[P](tried: Try[P]): Pulse[P]

Transforms a Try into a Value or Exceptional Pulse

Transforms a Try into a Value or Exceptional Pulse

def tryCatch[P >: Change[Nothing] <: Pulse[_]](f: => P, onEmpty: P): P

wrap a pulse generating function to store eventual exceptions into an exceptional pulse

wrap a pulse generating function to store eventual exceptions into an exceptional pulse

Concrete fields

the pulse representing an empty signal

the pulse representing an empty signal