EitherMode

ox.EitherMode
class EitherMode[E] extends ErrorMode[E, [T] =>> Either[E, T]]

An error mode where errors are represented as Either[E, T] instances.

Attributes

Graph
Supertypes
trait ErrorMode[E, [T] =>> Either[E, T]]
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

override def getError[T](f: Either[E, T]): E

Get the E error value, called only if isError(f) returns true.

Get the E error value, called only if isError(f) returns true.

Attributes

Definition Classes
override def getT[T](f: Either[E, T]): T

Get the T successful value, called only if isError(f) returns false.

Get the T successful value, called only if isError(f) returns false.

Attributes

Definition Classes
override def isError[T](f: Either[E, T]): Boolean

Check if f represents an error, or success.

Check if f represents an error, or success.

Attributes

Definition Classes
override def pure[T](t: T): Either[E, T]

Embed a value of type T into the F context.

Embed a value of type T into the F context.

Attributes

Definition Classes
override def pureError[T](e: E): Either[E, T]

Embed an error into the F context.

Embed an error into the F context.

Attributes

Definition Classes

Inherited methods

def addSuppressed[T](error: Either[E, T], e: Throwable): [T] =>> Either[E, T][T]

Adds a suppressed exception to the value being represented by error. This is only called if isError(error) returns true. By default, the suppressed exception is discarded and the original value is returned.

Adds a suppressed exception to the value being represented by error. This is only called if isError(error) returns true. By default, the suppressed exception is discarded and the original value is returned.

Attributes

Inherited from:
ErrorMode