Lens

zio.blocks.schema.Lens
See theLens companion trait
object Lens

Constructors for Lens.

Attributes

Companion
trait
Source
Optic.scala
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Lens.type

Members list

Type members

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements.

The names of the product elements.

Attributes

Inherited from:
Mirror
Source
Mirror.scala
type MirroredLabel <: String

The name of the type.

The name of the type.

Attributes

Inherited from:
Mirror
Source
Mirror.scala

Value members

Concrete methods

def apply[S, A](source: Bound[S], focusTerm: Bound[S, A]): Lens[S, A]

Creates a lens on the field focusTerm of the record source. The field is looked up by the term's name, so focusTerm must be one of source's fields. If it is not, the lens throws ArrayIndexOutOfBoundsException the first time it reads or writes a value (see docs/dev/issues.md). Reflect.Record#lensByName and the $ macro of CompanionOptics check the field for you.

Creates a lens on the field focusTerm of the record source. The field is looked up by the term's name, so focusTerm must be one of source's fields. If it is not, the lens throws ArrayIndexOutOfBoundsException the first time it reads or writes a value (see docs/dev/issues.md). Reflect.Record#lensByName and the $ macro of CompanionOptics check the field for you.

Attributes

Throws
java.lang.IllegalArgumentException

if source or focusTerm is null

Source
Optic.scala
def apply[S, T, A](first: Lens[S, T], second: Lens[T, A]): Lens[S, A]

Composes two lenses: the result focuses on second's focus inside first's focus. It is the same as first(second).

Composes two lenses: the result focuses on second's focus inside first's focus. It is the same as first(second).

Attributes

Throws
java.lang.IllegalArgumentException

if first or second is null

Source
Optic.scala