Lens

reactives.extra.lenses.Lens
See theLens companion object
trait Lens[M, V]

The base type for all lenses. If possible, use BijectiveLens instead as it provides more performance and additional functionality

Type parameters

M

the type of the model

V

the type of the view

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait BijectiveLens[M, V]
class AddLens[A]
class MulLens[A]
class NeutralLens[A]

Members list

Value members

Abstract methods

def toModel(v: V, m: M): M

Transforms the view to the model using the old model state

Transforms the view to the model using the old model state

Attributes

def toView(m: M): V

Transforms the model to the view

Transforms the model to the view

Attributes

Concrete methods

def compose[W](other: Lens[V, W]): Lens[M, W]

Concatenates this lens with another lens and returns the resulting lens. Internally, a LensVar is created, meaning that this function is just for convenience and not performance

Concatenates this lens with another lens and returns the resulting lens. Internally, a LensVar is created, meaning that this function is just for convenience and not performance

Value parameters

other

The other lens

Attributes

def toModel(v: V, m: M): M
Implicitly added by toSignalLens
def toView(m: M): Signal[V]
Implicitly added by toSignalLens