package optics
- Alphabetic
- By Inheritance
- optics
- Optics
- OpticTypesModule
- OpticResultModule
- OpticModule
- OpticFailureModule
- OpticComposeModule
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- implicit class AtZRefSyntax[EA >: EB, EB >: OpticFailure, A] extends AnyRef
Provides implicit syntax for accessing the specified index of a chunk in a
ZRef
. - implicit class ConsZRefSyntax[EA, EB >: OpticFailure, A] extends AnyRef
Provides implicit syntax for accessing the
::
case of aList
in aZRef
. - type EOptic[-GetWhole, -SetWholeBefore, -SetPiece, +Error, +GetPiece, +SetWholeAfter] = Optic[GetWhole, SetWholeBefore, SetPiece, Error, Error, GetPiece, SetWholeAfter]
- Definition Classes
- OpticTypesModule
- implicit class ERefSyntax[EA >: EB, EB, A, B] extends AnyRef
Providing implicit syntax for accessing pieces of a value in a
ZRef
when the error types are unified. - implicit class FilterZRefSyntax[EA >: EB, EB >: OpticFailure, A] extends AnyRef
Provides implicit syntax for accessing a filtered subset of a chunk in a
ZRef
. - implicit class FirstZRefSyntax[EA >: EB, EB, A, B, C] extends AnyRef
Provides implicit syntax for accessing the first element of a tuple in a
ZRef
. - type Fold[-S, +A] = Optic[S, Nothing, Nothing, OpticFailure, Any, Chunk[A], Any]
- Definition Classes
- OpticTypesModule
- type Getter[-S, +A] = Optic[S, Nothing, Nothing, OpticFailure, Any, A, Any]
- Definition Classes
- OpticTypesModule
- implicit class HeadZRefSyntax[EA >: EB, EB >: OpticFailure, A] extends AnyRef
Provides implicit syntax for accessing the head of a list in a
ZRef
. - type Iso[S, A] = Optic[S, Any, A, Nothing, Nothing, A, S]
- Definition Classes
- OpticTypesModule
- type IsoPartiallyApplied[+S, A] = Optic[Any, Any, A, Nothing, Nothing, A, S]
- Definition Classes
- OpticTypesModule
- implicit class KeyZRefSyntax[EA >: EB, EB >: OpticFailure, K, V] extends AnyRef
Provides implicit syntax for accessing the value at the specified key in a map in a
ZRef
. - implicit class LeftZRefSyntax[EA, EB >: OpticFailure, A, B, C] extends AnyRef
Provides implicit syntax for accessing the
Left
case of anEither
in aZRef
. - type Lens[S, A] = Optic[S, S, A, Nothing, Nothing, A, S]
- Definition Classes
- OpticTypesModule
- type LensPartiallyApplied[+S, A] = Optic[Any, Any, A, Nothing, Nothing, A, S]
- Definition Classes
- OpticTypesModule
- implicit class NoneZRefSyntax[EA, EB >: OpticFailure, A] extends AnyRef
Provides implicit syntax for accessing the
None
case of anOption
in aZRef
. - trait OpticComposeModule extends AnyRef
- trait LowPriorityOpticCompose extends AnyRef
- Definition Classes
- OpticComposeModule
- trait OpticCompose[GetWhole, SetWholeBefore, SetWholeBefore1, SetWholeBefore2, GetError, SetError, SetError1, GetPiece] extends AnyRef
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.- Definition Classes
- OpticComposeModule
- trait OpticFailureModule extends AnyRef
- case class OpticFailure(message: String) extends Exception with Product with Serializable
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.- Definition Classes
- OpticFailureModule
- trait OpticModule extends AnyRef
- case class Optic[-GetWhole, -SetWholeBefore, -SetPiece, +GetError, +SetError, +GetPiece, +SetWholeAfter](getOptic: (GetWhole) => (OpticModule.this)#OpticResult[(GetError, SetWholeAfter), GetPiece], setOptic: (SetPiece) => (SetWholeBefore) => (OpticModule.this)#OpticResult[(SetError, SetWholeAfter), SetWholeAfter]) extends Product with Serializable
An
Optic
is able to get and set a piece of a whole, possibly failing.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.- Definition Classes
- OpticModule
- type OpticPartiallyApplied[-SetPiece, +GetError, +SetError, +GetPiece, +SetWhole] = Optic[Any, Any, SetPiece, GetError, SetError, GetPiece, SetWhole]
- Definition Classes
- OpticTypesModule
- abstract type OpticResult[+E, +A]
An
OpticResult
represents the result from getting or setting a piece of a whole using an optic.An
OpticResult
represents the result from getting or setting a piece of a whole using an optic. This allows the library to abstract over pure optics, transactional optics, and effectual optics.- Definition Classes
- OpticResultModule
- trait OpticResultModule extends AnyRef
- trait OpticTypesModule extends AnyRef
- trait Optics extends OpticComposeModule with OpticFailureModule with OpticModule with OpticResultModule with OpticTypesModule
- implicit final class OpticSyntax[Whole] extends AnyRef
Provides implicit syntax for working with any value as a partially applied optic.
Provides implicit syntax for working with any value as a partially applied optic.
- Definition Classes
- Optics
- type Optional[S, A] = Optic[S, S, A, OpticFailure, OpticFailure, A, S]
- Definition Classes
- OpticTypesModule
- type OptionalPartiallyApplied[+S, A] = Optic[Any, Any, A, OpticFailure, OpticFailure, A, S]
- Definition Classes
- OpticTypesModule
- type Prism[S, A] = Optic[S, Any, A, OpticFailure, Nothing, A, S]
- Definition Classes
- OpticTypesModule
- type PrismPartiallyApplied[+S, A] = Optic[Any, Any, A, OpticFailure, Nothing, A, S]
- Definition Classes
- OpticTypesModule
- implicit class RightZRefSyntax[EA, EB >: OpticFailure, A, B, C] extends AnyRef
Provides implicit syntax for accessing the
Right
case of anEither
in aZRef
. - implicit class SecondZRefSyntax[EA >: EB, EB, A, B, C] extends AnyRef
Provides implicit syntax for accessing the second element of a tuple in a
ZRef
. - type Setter[S, -A] = Optic[Nothing, S, A, Any, OpticFailure, Any, S]
- Definition Classes
- OpticTypesModule
- implicit class SliceZRefSyntax[EA >: EB, EB >: OpticFailure, A] extends AnyRef
Provides implicit syntax for accessing a slice of a chunk in a
ZRef
. - implicit class SomeZRefSyntax[EA, EB >: OpticFailure, A, B] extends AnyRef
Provides implicit syntax for accessing the
Some
case of anOption
in aZRef
. - implicit class TailZRefSyntax[EA >: EB, EB >: OpticFailure, A] extends AnyRef
Provides implicit syntax for accessing the tail of a list in a
ZRef
. - type Traversal[S, A] = Optic[S, S, Chunk[A], OpticFailure, OpticFailure, Chunk[A], S]
- Definition Classes
- OpticTypesModule
- type TraversalPartiallyApplied[+S, A] = Optic[Any, Any, Chunk[A], OpticFailure, OpticFailure, Chunk[A], S]
- Definition Classes
- OpticTypesModule
- type ZIso[-S, +T, +A, -B] = Optic[S, Any, B, Nothing, Nothing, A, T]
- Definition Classes
- OpticTypesModule
- type ZIsoPartiallyApplied[+S, +A, -B] = Optic[Any, Any, B, Nothing, Nothing, A, S]
- Definition Classes
- OpticTypesModule
- type ZLens[-S, +T, +A, -B] = Optic[S, S, B, Nothing, Nothing, A, T]
- Definition Classes
- OpticTypesModule
- type ZLensPartiallyApplied[+S, +A, -B] = Optic[Any, Any, B, Nothing, Nothing, A, S]
- Definition Classes
- OpticTypesModule
- type ZOptional[-S, +T, +A, -B] = Optic[S, S, B, OpticFailure, OpticFailure, A, T]
- Definition Classes
- OpticTypesModule
- type ZOptionalPartiallyApplied[+S, +A, -B] = Optic[Any, Any, B, OpticFailure, OpticFailure, A, S]
- Definition Classes
- OpticTypesModule
- type ZPrism[-S, +T, +A, -B] = Optic[S, Any, B, OpticFailure, Nothing, A, T]
- Definition Classes
- OpticTypesModule
- type ZPrismPartiallyApplied[+S, +A, -B] = Optic[Any, Any, B, OpticFailure, Nothing, A, S]
- Definition Classes
- OpticTypesModule
- implicit class ZRefSyntax[EA, EB, A, B] extends AnyRef
Providing implicit syntax for accessing pieces of a value in a
ZRef
. - type ZSetter[-S, +T, -A] = Optic[Nothing, S, A, Any, OpticFailure, Any, T]
- Definition Classes
- OpticTypesModule
- type ZTraversal[-S, +T, +A, -B] = Optic[S, S, Chunk[B], OpticFailure, OpticFailure, Chunk[A], T]
- Definition Classes
- OpticTypesModule
- type ZTraversalPartiallyApplied[+S, +A, -B] = Optic[Any, Any, Chunk[B], OpticFailure, OpticFailure, Chunk[A], S]
- Definition Classes
- OpticTypesModule
Abstract Value Members
- abstract def fail[E](e: E): optics.OpticResult[E, Nothing]
Constructs an optic result that fails with the specified value.
Constructs an optic result that fails with the specified value.
- Attributes
- protected
- Definition Classes
- OpticResultModule
- abstract def flatMap[E, A, B](opticResult: optics.OpticResult[E, A])(f: (A) => optics.OpticResult[E, B]): optics.OpticResult[E, B]
Constructs an optic result by applying a function that returns an optic result to the success value of the specified optic result.
Constructs an optic result by applying a function that returns an optic result to the success value of the specified optic result.
- Attributes
- protected
- Definition Classes
- OpticResultModule
- abstract def foldM[E, E2, A, B](opticResult: optics.OpticResult[E, A])(f: (E) => optics.OpticResult[E2, B], g: (A) => optics.OpticResult[E2, B]): optics.OpticResult[E2, B]
Constructs an optic results that folds over the success and failure values of the specified optic result, transforming them with the functions
f
andg
that return an optic result.Constructs an optic results that folds over the success and failure values of the specified optic result, transforming them with the functions
f
andg
that return an optic result.- Attributes
- protected
- Definition Classes
- OpticResultModule
- abstract def map[E, A, B](opticResult: optics.OpticResult[E, A])(f: (A) => B): optics.OpticResult[E, B]
Constructs an optic result by applying a function to the success value of this optic result.
Constructs an optic result by applying a function to the success value of this optic result.
- Attributes
- protected
- Definition Classes
- OpticResultModule
- abstract def succeed[A](a: A): optics.OpticResult[Nothing, A]
Constructs an optic result that succeeds with the specified value.
Constructs an optic result that succeeds with the specified value.
- Attributes
- protected
- Definition Classes
- OpticResultModule
Concrete Value Members
- final def collectAllSuccesses[E, A](iterable: Iterable[optics.OpticResult[E, A]]): optics.OpticResult[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.
- Attributes
- protected
- Definition Classes
- OpticResultModule
- final def foreach[E, A, B](iterable: Iterable[A])(f: (A) => optics.OpticResult[E, B]): optics.OpticResult[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.
- Attributes
- protected
- Definition Classes
- OpticResultModule
- final def mapError[E, E2, A](opticResult: optics.OpticResult[E, A])(f: (E) => E2): optics.OpticResult[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.
- Attributes
- protected
- Definition Classes
- OpticResultModule
- final def orElse[E, E2, A](left: => optics.OpticResult[E, A], right: => optics.OpticResult[E2, A]): optics.OpticResult[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.
- Attributes
- protected
- Definition Classes
- OpticResultModule
- final def zip[E, A, B](left: => optics.OpticResult[E, A], right: => optics.OpticResult[E, B]): optics.OpticResult[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.
- Attributes
- protected
- Definition Classes
- OpticResultModule
- final def zipWith[E, A, B, C](left: => optics.OpticResult[E, A], right: => optics.OpticResult[E, B])(f: (A, B) => C): optics.OpticResult[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.
- Attributes
- protected
- Definition Classes
- OpticResultModule
- case object BuildInfo extends Product with Serializable
This object was generated by sbt-buildinfo.
- object OpticCompose extends (OpticComposeModule.this)#LowPriorityOpticCompose
- Definition Classes
- OpticComposeModule
- object Optic extends Serializable
- Definition Classes
- OpticModule
- object Iso
- Definition Classes
- OpticTypesModule
- object Lens
- Definition Classes
- OpticTypesModule
- object Optional
- Definition Classes
- OpticTypesModule
- object Prism
- Definition Classes
- OpticTypesModule
- object Traversal
- Definition Classes
- OpticTypesModule
- object ZIso
- Definition Classes
- OpticTypesModule
- object ZLens
- Definition Classes
- OpticTypesModule
- object ZOptional
- Definition Classes
- OpticTypesModule
- object ZPrism
- Definition Classes
- OpticTypesModule
- object ZTraversal
- Definition Classes
- OpticTypesModule