zio.optics

package zio.optics

Type members

Classlikes

class AtZRefSyntax[EA >: EB, EB >: OpticFailure, A](self: ZRef[EA, EB, Chunk[A], Chunk[A]])

Provides implicit syntax for accessing the specified index of a chunk in a ZRef.

Provides implicit syntax for accessing the specified index of a chunk in a ZRef.

case object BuildInfo

This object was generated by sbt-buildinfo.

This object was generated by sbt-buildinfo.

class ConsZRefSyntax[EA, EB >: OpticFailure, A](self: ZRef[EA, EB, List[A], List[A]])

Provides implicit syntax for accessing the :: case of a List in a ZRef.

Provides implicit syntax for accessing the :: case of a List in a ZRef.

class ERefSyntax[EA >: EB, EB, A, B](self: ZRef[EA, EB, A, B])

Providing implicit syntax for accessing pieces of a value in a ZRef when the error types are unified.

Providing implicit syntax for accessing pieces of a value in a ZRef when the error types are unified.

class FilterZRefSyntax[EA >: EB, EB >: OpticFailure, A](self: ZRef[EA, EB, Chunk[A], Chunk[A]])

Provides implicit syntax for accessing a filtered subset of a chunk in a ZRef.

Provides implicit syntax for accessing a filtered subset of a chunk in a ZRef.

class FirstZRefSyntax[EA >: EB, EB, A, B, C](self: ZRef[EA, EB, (C, B), (A, B)])

Provides implicit syntax for accessing the first element of a tuple in a ZRef.

Provides implicit syntax for accessing the first element of a tuple in a ZRef.

class HeadZRefSyntax[EA >: EB, EB >: OpticFailure, A](self: ZRef[EA, EB, List[A], List[A]])

Provides implicit syntax for accessing the head of a list in a ZRef.

Provides implicit syntax for accessing the head of a list in a ZRef.

class KeyZRefSyntax[EA >: EB, EB >: OpticFailure, K, V](self: ZRef[EA, EB, Map[K, V], Map[K, V]])

Provides implicit syntax for accessing the value at the specified key in a map in a ZRef.

Provides implicit syntax for accessing the value at the specified key in a map in a ZRef.

class LeftZRefSyntax[EA, EB >: OpticFailure, A, B, C](self: ZRef[EA, EB, Either[C, B], Either[A, B]])

Provides implicit syntax for accessing the Left case of an Either in a ZRef.

Provides implicit syntax for accessing the Left case of an Either in a ZRef.

class NoneZRefSyntax[EA, EB >: OpticFailure, A](self: ZRef[EA, EB, Option[A], Option[A]])

Provides implicit syntax for accessing the None case of an Option in a ZRef.

Provides implicit syntax for accessing the None case of an Option in a ZRef.

class RightZRefSyntax[EA, EB >: OpticFailure, A, B, C](self: ZRef[EA, EB, Either[A, C], Either[A, B]])

Provides implicit syntax for accessing the Right case of an Either in a ZRef.

Provides implicit syntax for accessing the Right case of an Either in a ZRef.

class SecondZRefSyntax[EA >: EB, EB, A, B, C](self: ZRef[EA, EB, (A, C), (A, B)])

Provides implicit syntax for accessing the second element of a tuple in a ZRef.

Provides implicit syntax for accessing the second element of a tuple in a ZRef.

class SliceZRefSyntax[EA >: EB, EB >: OpticFailure, A](self: ZRef[EA, EB, Chunk[A], Chunk[A]])

Provides implicit syntax for accessing a slice of a chunk in a ZRef.

Provides implicit syntax for accessing a slice of a chunk in a ZRef.

class SomeZRefSyntax[EA, EB >: OpticFailure, A, B](self: ZRef[EA, EB, Option[B], Option[A]])

Provides implicit syntax for accessing the Some case of an Option in a ZRef.

Provides implicit syntax for accessing the Some case of an Option in a ZRef.

class TailZRefSyntax[EA >: EB, EB >: OpticFailure, A](self: ZRef[EA, EB, List[A], List[A]])

Provides implicit syntax for accessing the tail of a list in a ZRef.

Provides implicit syntax for accessing the tail of a list in a ZRef.

class ZRefSyntax[EA, EB, A, B](self: ZRef[EA, EB, A, B])

Providing implicit syntax for accessing pieces of a value in a ZRef.

Providing implicit syntax for accessing pieces of a value in a ZRef.

Inherited classlikes

object Iso
Inherited from
OpticTypesModule
object Lens
Inherited from
OpticTypesModule
case class Optic[-GetWhole, -SetWholeBefore, -SetPiece, +GetError, +SetError, +GetPiece, +SetWholeAfter](getOptic: GetWhole => OpticResult[(GetError, SetWholeAfter), GetPiece], setOptic: SetPiece => SetWholeBefore => OpticResult[(SetError, SetWholeAfter), SetWholeAfter])

An Optic is able to get and set a piece of a whole, possibly failing. In the most general possible case the get and set types are distinct and getting may fail with a different error than setting.

An Optic is able to get and set a piece of a whole, possibly failing. In the most general possible case the get and set types are distinct and getting may fail with a different error than setting.

Inherited from
OpticModule
object Optic
Inherited from
OpticModule
object OpticCompose
Inherited from
OpticComposeModule
trait OpticCompose[GetWhole, SetWholeBefore, SetWholeBefore1, SetWholeBefore2, GetError, SetError, SetError1, GetPiece]()

OpticCompose abstracts over the different ways that optics can be composed together, allowing all optics to be composed with a single operator.

OpticCompose abstracts over the different ways that optics can be composed together, allowing all optics to be composed with a single operator.

Inherited from
OpticComposeModule
case class OpticFailure(message: String)

An OpticFailure describes how getting or setting a piece of a whole using an optic failed.

An OpticFailure describes how getting or setting a piece of a whole using an optic failed.

Inherited from
OpticFailureModule
object Optional
Inherited from
OpticTypesModule
object Prism
Inherited from
OpticTypesModule
object Traversal
Inherited from
OpticTypesModule
object ZIso
Inherited from
OpticTypesModule
object ZLens
Inherited from
OpticTypesModule
object ZOptional
Inherited from
OpticTypesModule
object ZPrism
Inherited from
OpticTypesModule
object ZTraversal
Inherited from
OpticTypesModule

Types

override type OpticResult[+E, +A] = Either[E, A]

Inherited types

type EOptic[-GetWhole, -SetWholeBefore, -SetPiece, +Error, +GetPiece, +SetWholeAfter] = Optic[GetWhole, SetWholeBefore, SetPiece, Error, Error, GetPiece, SetWholeAfter]
Inherited from
OpticTypesModule
type Fold[-S, +A] = Optic[S, Nothing, Nothing, OpticFailure, Any, Chunk[A], Any]
Inherited from
OpticTypesModule
type Getter[-S, +A] = Optic[S, Nothing, Nothing, OpticFailure, Any, A, Any]
Inherited from
OpticTypesModule
type Iso[S, A] = ZIso[S, S, A, A]
Inherited from
OpticTypesModule
Inherited from
OpticTypesModule
type Lens[S, A] = ZLens[S, S, A, A]
Inherited from
OpticTypesModule
Inherited from
OpticTypesModule
type OpticPartiallyApplied[-SetPiece, +GetError, +SetError, +GetPiece, +SetWhole] = Optic[Any, Any, SetPiece, GetError, SetError, GetPiece, SetWhole]
Inherited from
OpticTypesModule
type Optional[S, A] = ZOptional[S, S, A, A]
Inherited from
OpticTypesModule
type Prism[S, A] = ZPrism[S, S, A, A]
Inherited from
OpticTypesModule
type Setter[S, -A] = ZSetter[S, S, A]
Inherited from
OpticTypesModule
type Traversal[S, A] = ZTraversal[S, S, A, A]
Inherited from
OpticTypesModule
type ZIso[-S, +T, +A, -B] = Optic[S, Any, B, Nothing, Nothing, A, T]
Inherited from
OpticTypesModule
type ZIsoPartiallyApplied[+S, +A, -B] = ZIso[Any, S, A, B]
Inherited from
OpticTypesModule
type ZLens[-S, +T, +A, -B] = Optic[S, S, B, Nothing, Nothing, A, T]
Inherited from
OpticTypesModule
type ZLensPartiallyApplied[+S, +A, -B] = ZLens[Any, S, A, B]
Inherited from
OpticTypesModule
type ZOptional[-S, +T, +A, -B] = Optic[S, S, B, OpticFailure, OpticFailure, A, T]
Inherited from
OpticTypesModule
type ZOptionalPartiallyApplied[+S, +A, -B] = ZOptional[Any, S, A, B]
Inherited from
OpticTypesModule
type ZPrism[-S, +T, +A, -B] = Optic[S, Any, B, OpticFailure, Nothing, A, T]
Inherited from
OpticTypesModule
type ZPrismPartiallyApplied[+S, +A, -B] = ZPrism[Any, S, A, B]
Inherited from
OpticTypesModule
type ZSetter[-S, +T, -A] = Optic[Nothing, S, A, Any, OpticFailure, Any, T]
Inherited from
OpticTypesModule
type ZTraversal[-S, +T, +A, -B] = Optic[S, S, Chunk[B], OpticFailure, OpticFailure, Chunk[A], T]
Inherited from
OpticTypesModule
type ZTraversalPartiallyApplied[+S, +A, -B] = ZTraversal[Any, S, A, B]
Inherited from
OpticTypesModule

Value members

Inherited methods

final protected def collectAllSuccesses[E, A](iterable: Iterable[Either[E, A]]): Either[Nothing, Chunk[A]]

Constructs an optic result that succeeds with all the success values in the specified collection of optic results, discarding the failures.

Constructs an optic result that succeeds with all the success values in the specified collection of optic results, discarding the failures.

Inherited from
OpticResultModule
final protected def foreach[E, A, B](iterable: Iterable[A])(f: A => Either[E, B]): Either[E, Chunk[B]]

Constructs an optic result that applies a function returning an optic result to each element in the specified collection and collects the results into a single optic result.

Constructs an optic result that applies a function returning an optic result to each element in the specified collection and collects the results into a single optic result.

Inherited from
OpticResultModule
final protected def mapError[E, E2, A](opticResult: Either[E, A])(f: E => E2): Either[E2, A]

Constructs an optic result by applying a function to the failure value of this optic result.

Constructs an optic result by applying a function to the failure value of this optic result.

Inherited from
OpticResultModule
final protected def orElse[E, E2, A](left: => Either[E, A], right: => Either[E2, A]): Either[E2, A]

Constructs an optic result that is equal to the left optic result if it is successful or else the right optic result.

Constructs an optic result that is equal to the left optic result if it is successful or else the right optic result.

Inherited from
OpticResultModule
final protected def zip[E, A, B](left: => Either[E, A], right: => Either[E, B]): Either[E, (A, B)]

Constructs an optic result that combines the left and right optic results.

Constructs an optic result that combines the left and right optic results.

Inherited from
OpticResultModule
final protected def zipWith[E, A, B, C](left: => Either[E, A], right: => Either[E, B])(f: (A, B) => C): Either[E, C]

Constructs an optic result that combines the left and right optic results, transforming their success values with the specified function.

Constructs an optic result that combines the left and right optic results, transforming their success values with the specified function.

Inherited from
OpticResultModule