PanicOps

izumi.functional.bio.syntax.Syntax2$.PanicOps
class PanicOps[F[_, _], +E, +A](val r: F[E, A])(implicit val F: Panic2[F]) extends BracketOps[F, E, A]

Attributes

Graph
Supertypes
class BracketOps[F, E, A]
class ErrorOps[F, E, A]
class ApplicativeErrorOps[F, E, A]
class GuaranteeOps[F, E, A]
class ApplicativeOps[F, E, A]
class FunctorOps[F, E, A]
class Object
trait Matchable
class Any
Known subtypes
class IOOps[F, E, A]
class AsyncOps[F, E, A]

Members list

Concise view

Value members

Concrete methods

final def orTerminate(implicit ev: E <:< Throwable): F[Nothing, A]

Convert Throwable typed error into a defect

Convert Throwable typed error into a defect

Attributes

final def sandbox: F[Failure[E], A]
final def sandboxExit: F[Nothing, Exit[E, A]]
final def sandboxToThrowable(implicit ev: E <:< Throwable): F[Throwable, A]

Catch all defects in this effect and convert them to Throwable Example:

Catch all defects in this effect and convert them to Throwable Example:

 F.pure(1)
   .map(_ => ???)
   .sandboxThrowable
   .catchAll(_ => IO2(println("Caught error!")))

Attributes

final def uninterruptible: F[E, A]

Inherited methods

final def *>[E1 >: E, B](f0: => F[E1, B]): F[E1, B]

execute two operations in order, return result of second operation

execute two operations in order, return result of second operation

Attributes

Inherited from:
ApplicativeOps
final def <*[E1 >: E, B](f0: => F[E1, B]): F[E1, A]

execute two operations in order, same as *>, but return result of first operation

execute two operations in order, same as *>, but return result of first operation

Attributes

Inherited from:
ApplicativeOps
final def as[B](b: => B): F[E, B]

Attributes

Inherited from:
FunctorOps
final def attempt: F[Nothing, Either[E, A]]

Attributes

Inherited from:
ErrorOps
final def bimap[E2, B](f: E => E2, g: A => B): F[E2, B]

Attributes

Inherited from:
ApplicativeErrorOps
final def bracket[E1 >: E, B](release: A => F[Nothing, Unit])(use: A => F[E1, B]): F[E1, B]

Attributes

Inherited from:
BracketOps
final def bracketCase[E1 >: E, B](release: (A, Exit[E1, B]) => F[Nothing, Unit])(use: A => F[E1, B]): F[E1, B]

Attributes

Inherited from:
BracketOps
final def bracketOnFailure[E1 >: E, B](cleanupOnFailure: (A, Failure[E1]) => F[Nothing, Unit])(use: A => F[E1, B]): F[E1, B]

Attributes

Inherited from:
BracketOps
final def catchAll[E2, A2 >: A](h: E => F[E2, A2]): F[E2, A2]

Attributes

Inherited from:
ErrorOps
final def catchSome[E1 >: E, A2 >: A](h: PartialFunction[E, F[E1, A2]]): F[E1, A2]

Attributes

Inherited from:
ErrorOps
final def flatMap[E1 >: E, B](f0: A => F[E1, B]): F[E1, B]

Attributes

Inherited from:
ErrorOps
final def flatten[E1 >: E, A1](implicit ev: A <:< F[E1, A1]): F[E1, A1]

Attributes

Inherited from:
ErrorOps
final def flip: F[A, E]

Attributes

Inherited from:
ErrorOps
final def forever: F[E, Nothing]

Attributes

Inherited from:
ApplicativeOps
final def fromEither[E1 >: E, A1](implicit ev: A <:< Either[E1, A1]): F[E1, A1]

Attributes

Inherited from:
ErrorOps
final def fromOption[E1 >: E, A1](errorOnNone: => E1)(implicit ev1: A <:< Option[A1]): F[E1, A1]

Attributes

Inherited from:
ErrorOps
final def fromOptionF[E1 >: E, B](fallbackOnNone: => F[E1, B])(implicit ev: A <:< Option[B]): F[E1, B]

Attributes

Inherited from:
ErrorOps
final def fromOptionOr[B](valueOnNone: => B)(implicit ev: A <:< Option[B]): F[E, B]

Attributes

Inherited from:
FunctorOps
final def guarantee(cleanup: F[Nothing, Unit]): F[E, A]

Attributes

Inherited from:
GuaranteeOps
final def guaranteeCase(cleanup: Exit[E, A] => F[Nothing, Unit]): F[E, A]

Attributes

Inherited from:
BracketOps
final def guaranteeExceptOnInterrupt(cleanupOnNonInterruption: Either[Termination, Either[Error[E], Success[A]]] => F[Nothing, Unit]): F[E, A]

Attributes

Inherited from:
BracketOps
final def guaranteeOnFailure(cleanupOnFailure: Failure[E] => F[Nothing, Unit]): F[E, A]

Attributes

Inherited from:
BracketOps
final def guaranteeOnInterrupt(cleanupOnInterruption: Interruption => F[Nothing, Unit]): F[E, A]

Attributes

Inherited from:
BracketOps
final def iterateUntil(p: A => Boolean): F[E, A]

Attributes

Inherited from:
ErrorOps
final def iterateWhile(p: A => Boolean): F[E, A]

Attributes

Inherited from:
ErrorOps
final def leftFlatMap[E2](f: E => F[Nothing, E2]): F[E2, A]

Attributes

Inherited from:
ErrorOps
final def leftMap[E2](f: E => E2): F[E2, A]

Attributes

Inherited from:
ApplicativeErrorOps
final def leftMap2[E2, A1 >: A, E3](r2: => F[E2, A1])(f: (E, E2) => E3): F[E3, A1]

Attributes

Inherited from:
ApplicativeErrorOps
final def map[B](f: A => B): F[E, B]

Attributes

Inherited from:
FunctorOps
final def map2[E2 >: E, B, C](r2: => F[E2, B])(f: (A, B) => C): F[E2, C]

execute two operations in order, map their results

execute two operations in order, map their results

Attributes

Inherited from:
ApplicativeOps
final def orElse[E2, A1 >: A](r2: => F[E2, A1]): F[E2, A1]

Attributes

Inherited from:
ApplicativeErrorOps
final def redeem[E2, B](err: E => F[E2, B], succ: A => F[E2, B]): F[E2, B]

Attributes

Inherited from:
ErrorOps
final def redeemPure[B](err: E => B, succ: A => B): F[Nothing, B]

Attributes

Inherited from:
ErrorOps
final def retryUntil(f: E => Boolean): F[E, A]

Attributes

Inherited from:
ErrorOps
final def retryUntilF(f: E => F[Nothing, Boolean]): F[E, A]

Attributes

Inherited from:
ErrorOps
final def retryWhile(f: E => Boolean): F[E, A]

Attributes

Inherited from:
ErrorOps
final def retryWhileF(f: E => F[Nothing, Boolean]): F[E, A]

Attributes

Inherited from:
ErrorOps
final def tap[E1 >: E](f0: A => F[E1, Unit]): F[E1, A]

Attributes

Inherited from:
ErrorOps
final def tapBoth[E1 >: E, E2 >: E1](err: E => F[E1, Unit])(succ: A => F[E2, Unit]): F[E2, A]

Attributes

Inherited from:
ErrorOps
final def tapError[E1 >: E](f: E => F[E1, Unit]): F[E1, A]

Attributes

Inherited from:
ErrorOps
final def void: F[E, Unit]

Attributes

Inherited from:
FunctorOps
final def widen[A1](implicit ev: A <:< A1): F[E, A1]

Attributes

Inherited from:
FunctorOps
final def widenBoth[E1 >: E, A1](implicit ev2: A <:< A1): F[E1, A1]

Attributes

Inherited from:
ApplicativeErrorOps
final def widenError[E1 >: E]: F[E1, A]

Attributes

Inherited from:
ApplicativeErrorOps
final def withFilter[A1 >: A, E1 >: E](predicate: A => Boolean)(implicit filter: WithFilter[E1], pos: SourceFilePositionMaterializer): F[E1, A]

for-comprehensions sugar:

for-comprehensions sugar:

 for {
   (1, 2) <- F.pure((2, 1))
 } yield ()

Use widenError for pattern matching with non-Throwable errors:

 val f = for {
   (1, 2) <- F.pure((2, 1)).widenError[Option[Unit]]
 } yield ()
 // f: F[Option[Unit], Unit] = F.fail(Some(())

Attributes

Inherited from:
ErrorOps
final def zip[E2 >: E, B, C](r2: => F[E2, B]): F[E2, (A, B)]

execute two operations in order, return result of both operations

execute two operations in order, return result of both operations

Attributes

Inherited from:
ApplicativeOps