implicit class EitherSyntax[V] extends AnyRef
Syntax for treating scala.Either
as signifiers of success or failure in a computation.
The simplest usage is something like: myEither ~>? "Do I have the right?"
. The 'value'
and log tree of the returned treelog.LogTreeSyntax.DescribedComputation will indicate success or failure
depending on the value of myEither
.
- Alphabetic
- By Inheritance
- EitherSyntax
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new EitherSyntax(e: Either[String, V])
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[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
~>?(leftDescription: (String) ⇒ String, rightDescription: (V) ⇒ String): DescribedComputation[V]
Use the given functions to provide descriptions depending on whether
either
is a\/-
or-\/
-
def
~>?(description: (V) ⇒ String): DescribedComputation[V]
Use the given description if
either
is a\/-
.Use the given description if
either
is a\/-
. Ifeither
is-\/(message)
, usemessage
as the description. -
def
~>?(description: String): DescribedComputation[V]
Use the same description regardless of whether
either
is a\/-
or a-\/
.Use the same description regardless of whether
either
is a\/-
or a-\/
. Equivalent to:~>?((error: String) ⇒ s"$description - $error", description)
-
def
~>?(leftDescription: (String) ⇒ String, rightDescription: ⇒ String): DescribedComputation[V]
Use different descriptions depending on whether
either
is a\/-
or a-\/
. -
def
~>?(leftDescription: String, rightDescription: (V) ⇒ String): DescribedComputation[V]
Use different descriptions depending on whether
either
is a\/-
or a-\/
.