Lens

org.encalmo.lens.Lens
See theLens companion trait
object Lens

Attributes

Companion
trait
Experimental
true
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Lens.type

Members list

Type members

Classlikes

abstract class AdjustableLens[R, T <: Product, V <: Product] extends Lens[R, V], Selectable

Lens instance offering possibility to further select more fine-grained properties.

Lens instance offering possibility to further select more fine-grained properties.

Attributes

Supertypes
trait Selectable
trait Lens[R, V]
class Object
trait Matchable
class Any
abstract class FixedLens[R, T <: Product, V] extends Lens[R, V]

Lens instance fixed on some final property.

Lens instance fixed on some final property.

Attributes

Supertypes
trait Lens[R, V]
class Object
trait Matchable
class Any
final class LensMount[R <: Product] extends Selectable

Root mount from which particular Lens instances can be derived for available properties.

Root mount from which particular Lens instances can be derived for available properties.

Attributes

Supertypes
trait Selectable
class Object
trait Matchable
class Any

Types

type Find[T <: Tuple, Label <: String & Singleton] = T match { case EmptyTuple => Unit case (Label, v) *: _$3 => v case _$4 *: t => Find[t, Label] }
type LensOf[R, V, X] = X match { case Product => AdjustableLens[R, V, X] case Any => FixedLens[R, V, X] }
type TypeByName[T <: AnyNamedTuple, Label <: String & Singleton] = Find[Zip[Names[T], DropNames[T]], Label]

Value members

Concrete methods

inline def apply[R <: Product]: LensMount[R]