LensedVar

semagrams.util.LensedVar
class LensedVar[A, B](val v: UndoableVar[A], val l: Lens[A, B])

A view of a variable. Uses a lens to forward gets and sets to an underlying UndoableVar.

Note: this is specialized to UndoableVar right now because there isn't an informative superclass of both UndoableVar and Var. At some point we should fix this.

Maybe we should send a PR with UndoableVar and LensedVar to Laminar?

Attributes

Todo:

implement more of the Var api.

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

def zoomL[C](m: Lens[B, C]): LensedVar[A, C]

Construct a further LensedVar by composing lenses

Construct a further LensedVar by composing lenses

Attributes

Concrete fields

val l: Lens[A, B]
val signal: Signal[B]

A signal that uses the getter of the lens to output a derived signal

A signal that uses the getter of the lens to output a derived signal

Attributes

val v: UndoableVar[A]
val writer: Observer[B]

An observer that uses the lens to write to the underlying var.

An observer that uses the lens to write to the underlying var.

Attributes