LVar

reactives.extra.lenses.LVar
See theLVar companion object
class LVar[M]

LVars serve as the basis for reactive lenses. To create the root of a new LVar cluster, use the apply() function of the LVar object. Then, connect additional LVars via Lenses using the applyLens() function of an existing LVar.

Value parameters

events

Incoming events indicating a change to the LVar cluster

state

The state of the LVar

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Grouped members

accessor

final def now: Signal.this.T
Exported from Signal

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.

Attributes

Value members

Concrete methods

def applyLens[V](lens: SignalLens[M, V])(using cs: CreationScope[State]): LVar[V]

TODO: The BijectiveSigLens requires a reactive read without evaluating dependencies. As this is currently not supported by REScala, it uses .now instead! Creates a new LVar which is connected to this LVar via the given Lens.

TODO: The BijectiveSigLens requires a reactive read without evaluating dependencies. As this is currently not supported by REScala, it uses .now instead! Creates a new LVar which is connected to this LVar via the given Lens.

Value parameters

lens

The lens which connects the LVars. Can use using conversion from Lens if the Lens does not need to change later

Attributes

def applyLens[V](lens: Lens[M, V])(using cs: CreationScope[State]): LVar[V]
def getEvent()(using ticket: CreationTicket[State]): Event[M]

Returns the first firing event of all registered events

Returns the first firing event of all registered events

Attributes

final def observe(onValue: M => Unit, onError: (Throwable => Unit) | Null, fireImmediately: Boolean)(using ticket: CreationTicket[State]): Disconnectable
inline def value: M

Function to access state of LVar in reactives. Simple wrapper for internal.value.

Function to access state of LVar in reactives. Simple wrapper for internal.value.

Attributes

Concrete fields

val state: Signal[M]