ExitCase

cats.effect.kernel.Resource$.ExitCase$
See theExitCase companion trait
object ExitCase

Attributes

Companion
trait
Source
Resource.scala
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
ExitCase.type

Members list

Type members

Classlikes

case object Canceled extends ExitCase

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.

Attributes

Source
Resource.scala
Supertypes
trait Singleton
trait Product
trait Mirror
trait ExitCase
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
Canceled.type
final case class Errored(e: Throwable) extends ExitCase

An ExitCase signaling completion in failure.

An ExitCase signaling completion in failure.

Attributes

Source
Resource.scala
Supertypes
trait ExitCase
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case object Succeeded extends ExitCase

An ExitCase that signals successful completion.

An ExitCase that signals successful completion.

Note that "successful" is from the type of view of the MonadCancel type.

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. <-- TODO still true?

Attributes

Source
Resource.scala
Supertypes
trait Singleton
trait Product
trait Mirror
trait ExitCase
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
Succeeded.type

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
Source
Mirror.scala

The name of the type

The name of the type

Attributes

Inherited from:
Mirror
Source
Mirror.scala

Value members

Concrete methods

def fromOutcome[F[_], A](outcome: Outcome[F, Throwable, A]): ExitCase

Attributes

Source
Resource.scala