Pulse

rescala.structure.Pulse
See thePulse companion trait
object Pulse

Object containing utility functions for using pulses

Attributes

Companion
trait
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Pulse.type

Members list

Type members

Classlikes

final case class Exceptional(throwable: Throwable) extends Pulse[Nothing]

Pulse indicating an exception

Pulse indicating an exception

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Pulse[Nothing]
class Object
trait Matchable
class Any
Show all
case object NoChange extends Pulse[Nothing]

Pulse indicating no change

Pulse indicating no change

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Pulse[Nothing]
class Object
trait Matchable
class Any
Show all
Self type
NoChange.type
final case class Value[+P](update: P) extends Pulse[P]

Pulse indicating a change

Pulse indicating a change

Value parameters

update

Updated value stored by the pulse

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Pulse[P]
class Object
trait Matchable
class Any
Show all

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror

The name of the type

The name of the type

Attributes

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.

Attributes

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 parameters

P

Value type of both option and returned pulse

Value parameters

opt

Option to transform into a pulse

Attributes

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

Attributes

def tryCatch[P](f: => Pulse[P], onEmpty: Pulse[P]): Pulse[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

Attributes

Concrete fields

the pulse representing an empty signal

the pulse representing an empty signal

Attributes