EventBundle

rescala.operator.EventBundle
trait EventBundle extends FoldBundle

Attributes

Graph
Supertypes
trait FoldBundle
class Object
trait Matchable
class Any
Known subtypes
trait Operators
trait Interface
class FullMVApi
object default
class FromScheduler[S]
object default
object ParRPDefault
Show all
Self type

Members list

Grouped members

create

opaque object Event

Similar to rescala.operator.SignalBundle.Signal expressions, but resulting in an event. Accessed events return options depending on whether they fire or not, and the complete result of the expression is an event as well.

Similar to rescala.operator.SignalBundle.Signal expressions, but resulting in an event. Accessed events return options depending on whether they fire or not, and the complete result of the expression is an event as well.

Attributes

See also
Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
Event.type

Type members

Classlikes

trait Event[+T] extends MacroAccess[Option[T]], Disconnectable

Events only propagate a value when they are changing, when the system is at rest, events have no values.

Events only propagate a value when they are changing, when the system is at rest, events have no values.

Note: We hide implicit parameters of the API in the documentation. They are used to ensure correct creation, and you normally do not have to worry about them, except if you accidentally call the implicit parameter list, in which cas you may get cryptic errors. This is a scala limitation. We also hide the internal state parameter of passed and returned events.

Type parameters

T

Value type of the event occurrences.

Attributes

Companion
object
Supertypes
trait MacroAccess[Option[T]]
trait ReadAs[Option[T]]
trait ReSource
class Object
trait Matchable
class Any
Show all
Known subtypes
class Evt[T]
object Events

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Events.type

Inherited classlikes

object Fold

Folds when any one of a list of events occurs, if multiple events occur, every fold is executed in order.

Folds when any one of a list of events occurs, if multiple events occur, every fold is executed in order.

Example for a counter that can be reset:

 Fold(0)(
   add act { x => current + v },
   reset act { _ => 0 }
 )

Attributes

Inherited from:
FoldBundle
Supertypes
class Object
trait Matchable
class Any

Value members

Inherited methods

inline def current[S](using fs: FoldState[S]): S

Attributes

Inherited from:
FoldBundle

Extensions

Inherited extensions

extension [T](e: Event[T])
infix inline def act[S](inline f: (FoldState[S]) ?=> T => S): Branch[S]

Attributes

Inherited from:
FoldBundle