trait OpticResultModule extends AnyRef
- Alphabetic
- By Inheritance
- OpticResultModule
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- 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.
Abstract Value Members
- abstract def fail[E](e: E): 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
- abstract def flatMap[E, A, B](opticResult: OpticResult[E, A])(f: (A) => OpticResult[E, B]): 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
- abstract def foldM[E, E2, A, B](opticResult: OpticResult[E, A])(f: (E) => OpticResult[E2, B], g: (A) => OpticResult[E2, B]): 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
- abstract def map[E, A, B](opticResult: OpticResult[E, A])(f: (A) => B): 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
- abstract def succeed[A](a: A): 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
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def collectAllSuccesses[E, A](iterable: Iterable[OpticResult[E, A]]): 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
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def foreach[E, A, B](iterable: Iterable[A])(f: (A) => OpticResult[E, B]): 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
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def mapError[E, E2, A](opticResult: OpticResult[E, A])(f: (E) => E2): 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
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def orElse[E, E2, A](left: => OpticResult[E, A], right: => OpticResult[E2, A]): 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
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def zip[E, A, B](left: => OpticResult[E, A], right: => OpticResult[E, B]): 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
- final def zipWith[E, A, B, C](left: => OpticResult[E, A], right: => OpticResult[E, B])(f: (A, B) => C): 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