trait Recoverable[F[_], E] extends Serializable
The Recoverable
type-class is the equivalent of
ApplicativeError
or of MonadError
from other libraries like
Cats or Scalaz. This type class allows one to abstract over
error-handling applicatives.
The purpose of this type-class is to support the data-types in the Monix library and it is considered a shim for a lawful type-class to be supplied by libraries such as Cats or Scalaz or equivalent.
To implement it in instances, inherit from RecoverableClass.
Credit should be given where it is due.The type-class encoding has been copied from the Scado project and Scalaz 8 and the type has been extracted from Cats.
- Alphabetic
- By Inheritance
- Recoverable
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
- abstract def applicative: Applicative[F]
-
abstract
def
onErrorHandle[A](fa: F[A])(f: (E) ⇒ A): F[A]
Handle any error, by mapping it to an
A
value. -
abstract
def
onErrorHandleWith[A](fa: F[A])(f: (E) ⇒ F[A]): F[A]
Handle any error, potentially recovering from it, by mapping it to an
F[A]
value. -
abstract
def
onErrorRecover[A](fa: F[A])(pf: PartialFunction[E, A]): F[A]
Recover from certain errors by mapping them to an
A
value. -
abstract
def
onErrorRecoverWith[A](fa: F[A])(pf: PartialFunction[E, F[A]]): F[A]
Recover from certain errors by mapping them to an
F[A]
value. -
abstract
def
raiseError[A](e: E): F[A]
Lift an error into the
F
context.
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )