ExitCase

object ExitCase
Companion
class
trait Sum
trait Mirror
class Object
trait Matchable
class Any

Type members

Classlikes

case object Canceled extends ExitCase[Nothing]

An ExitCase signaling that the action was aborted.

An ExitCase signaling that the action was aborted.

As an example this can happen when we have a cancelable data type, like IO and the task yielded by bracket gets canceled when it's at its use phase.

Thus Bracket allows you to observe interruption conditions and act on them.

case object Completed extends ExitCase[Nothing]

An ExitCase that signals successful completion.

An ExitCase that signals successful completion.

Note that "successful" is from the type of view of the MonadError type that's implementing Bracket. When combining such a type with EitherT or OptionT for example, this exit condition might not signal a successful outcome for the user, but it does for the purposes of the bracket operation.

final case class Error[+E](e: E) extends ExitCase[E]

An ExitCase signaling completion in failure.

An ExitCase signaling completion in failure.

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Inherited from
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Inherited from
Mirror

Value members

Concrete methods

def attempt[E, A](value: Either[E, A]): ExitCase[E]

Converts from Scala's Either, which is often the result of MonadError's attempt operation, into an ExitCase.

Converts from Scala's Either, which is often the result of MonadError's attempt operation, into an ExitCase.

def canceled[E]: ExitCase[E]

Alias for Canceled.

Alias for Canceled.

def complete[E]: ExitCase[E]

Parametrized alias for the Completed data constructor.

Parametrized alias for the Completed data constructor.

def error[E](e: E): ExitCase[E]

Alias for the Error data constructor.

Alias for the Error data constructor.