WithError

kantan.codecs.ResultCompanion.WithError
abstract class WithError[F] extends WithDefault[F]

Similar to WithDefault, but uses IsError to deal with error cases.

Attributes

Graph
Supertypes
trait WithDefault[F]
trait Simple[F]
trait Simple[F]
class Object
trait Matchable
class Any
Show all
Known subtypes
object OpenResult
object ProcessResult
object StringResult

Members list

Value members

Concrete methods

override def fromThrowable(t: Throwable): F

Turns an exception into an error.

Turns an exception into an error.

Attributes

Definition Classes

Inherited methods

def apply[S](s: => S): Either[F, S]

Attempts to evaluate the specified expression.

Attempts to evaluate the specified expression.

Attributes

Inherited from:
WithDefault
def failure(f: F): Either[F, Nothing]

Turns the specified value into a failure.

Turns the specified value into a failure.

Attributes

Inherited from:
Simple
def fromTry[S](t: Try[S]): Either[F, S]

Turns the specified Try into a result.

Turns the specified Try into a result.

Attributes

Inherited from:
WithDefault
def sequence[S, M <: (IterableOnce)](rs: M[Either[F, S]])(implicit bf: BuildFrom[M[Either[F, S]], S, M[S]]): Either[F, M[S]]

Turns a collection of results into a result of a collection.

Turns a collection of results into a result of a collection.

Attributes

Inherited from:
Simple
def success[S](s: S): Either[F, S]

Turns the specified value into a success.

Turns the specified value into a success.

Attributes

Inherited from:
Simple