Class

monix.eval.Coeval

Error

Related Doc: package Coeval

Permalink

final case class Error(ex: Throwable) extends Attempt[Nothing] with Product with Serializable

Constructs an eager Coeval instance for a result that represents an error.

Source
Coeval.scala
Linear Supertypes
Attempt[Nothing], Product, Equals, Coeval[Nothing], Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Error
  2. Attempt
  3. Product
  4. Equals
  5. Coeval
  6. Serializable
  7. Serializable
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Error(ex: Throwable)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def asScala: Try[Nothing]

    Permalink

    Converts this attempt into a scala.util.Try.

    Converts this attempt into a scala.util.Try.

    Definition Classes
    Attempt
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def dematerialize[B](implicit ev: <:<[Nothing, Try[B]]): Coeval[B]

    Permalink

    Dematerializes the source's result from a Try.

    Dematerializes the source's result from a Try.

    Definition Classes
    Coeval
  8. def dematerializeAttempt[B](implicit ev: <:<[Nothing, Attempt[B]]): Attempt[B]

    Permalink

    Dematerializes the source's result from an Attempt.

    Dematerializes the source's result from an Attempt.

    Definition Classes
    AttemptCoeval
  9. def doOnFinish(f: (Option[Throwable]) ⇒ Coeval[Unit]): Coeval[Nothing]

    Permalink

    Returns a new Coeval in which f is scheduled to be run on completion.

    Returns a new Coeval in which f is scheduled to be run on completion. This would typically be used to release any resources acquired by this Coeval.

    Definition Classes
    Coeval
  10. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  11. val ex: Throwable

    Permalink
  12. def failed: Attempt[Throwable]

    Permalink

    Returns a failed projection of this coeval.

    Returns a failed projection of this coeval.

    The failed projection is a future holding a value of type Throwable, emitting a value which is the throwable of the original coeval in case the original coeval fails, otherwise if the source succeeds, then it fails with a NoSuchElementException.

    Definition Classes
    AttemptCoeval
  13. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. def flatMap[B](f: (Nothing) ⇒ Coeval[B]): Coeval[B]

    Permalink

    Creates a new Coeval by applying a function to the successful result of the source, and returns a new instance equivalent to the result of the function.

    Creates a new Coeval by applying a function to the successful result of the source, and returns a new instance equivalent to the result of the function.

    Definition Classes
    Coeval
  15. def flatten[B](implicit ev: <:<[Nothing, Coeval[B]]): Coeval[B]

    Permalink

    Given a source Coeval that emits another Coeval, this function flattens the result, returning a Coeval equivalent to the emitted Coeval by the source.

    Given a source Coeval that emits another Coeval, this function flattens the result, returning a Coeval equivalent to the emitted Coeval by the source.

    Definition Classes
    Coeval
  16. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  17. def isFailure: Boolean

    Permalink

    Returns true if result is an error.

    Returns true if result is an error.

    Definition Classes
    Attempt
  18. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  19. def isSuccess: Boolean

    Permalink

    Returns true if value is a successful one.

    Returns true if value is a successful one.

    Definition Classes
    Attempt
  20. def map[B](f: (Nothing) ⇒ B): Coeval[B]

    Permalink

    Returns a new Coeval that applies the mapping function to the element emitted by the source.

    Returns a new Coeval that applies the mapping function to the element emitted by the source.

    Definition Classes
    Coeval
  21. def materialize: Coeval[Try[Nothing]]

    Permalink

    Creates a new Coeval that will expose any triggered error from the source.

    Creates a new Coeval that will expose any triggered error from the source.

    Definition Classes
    Coeval
  22. def materializeAttempt: Attempt[Attempt[Nothing]]

    Permalink

    Creates a new Coeval that will expose any triggered error from the source.

    Creates a new Coeval that will expose any triggered error from the source.

    Definition Classes
    AttemptCoeval
  23. def memoize: Attempt[Nothing]

    Permalink

    Memoizes the result on the computation and reuses it on subsequent invocations of runAsync.

    Memoizes the result on the computation and reuses it on subsequent invocations of runAsync.

    Definition Classes
    AttemptCoeval
  24. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  25. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  27. def onErrorFallbackTo[B >: Nothing](that: Coeval[B]): Coeval[B]

    Permalink

    Creates a new coeval that in case of error will fallback to the given backup coeval.

    Creates a new coeval that in case of error will fallback to the given backup coeval.

    Definition Classes
    Coeval
  28. def onErrorHandle[U >: Nothing](f: (Throwable) ⇒ U): Coeval[U]

    Permalink

    Creates a new coeval that will handle any matching throwable that this coeval might emit.

    Creates a new coeval that will handle any matching throwable that this coeval might emit.

    See onErrorRecover for the version that takes a partial function.

    Definition Classes
    Coeval
  29. def onErrorHandleWith[B >: Nothing](f: (Throwable) ⇒ Coeval[B]): Coeval[B]

    Permalink

    Creates a new coeval that will handle any matching throwable that this coeval might emit by executing another coeval.

    Creates a new coeval that will handle any matching throwable that this coeval might emit by executing another coeval.

    See onErrorRecoverWith for the version that takes a partial function.

    Definition Classes
    Coeval
  30. def onErrorRecover[U >: Nothing](pf: PartialFunction[Throwable, U]): Coeval[U]

    Permalink

    Creates a new coeval that on error will try to map the error to another value using the provided partial function.

    Creates a new coeval that on error will try to map the error to another value using the provided partial function.

    See onErrorHandle for the version that takes a total function.

    Definition Classes
    Coeval
  31. def onErrorRecoverWith[B >: Nothing](pf: PartialFunction[Throwable, Coeval[B]]): Coeval[B]

    Permalink

    Creates a new coeval that will try recovering from an error by matching it with another coeval using the given partial function.

    Creates a new coeval that will try recovering from an error by matching it with another coeval using the given partial function.

    See onErrorHandleWith for the version that takes a total function.

    Definition Classes
    Coeval
  32. def onErrorRestart(maxRetries: Long): Coeval[Nothing]

    Permalink

    Creates a new coeval that in case of error will retry executing the source again and again, until it succeeds.

    Creates a new coeval that in case of error will retry executing the source again and again, until it succeeds.

    In case of continuous failure the total number of executions will be maxRetries + 1.

    Definition Classes
    Coeval
  33. def onErrorRestartIf(p: (Throwable) ⇒ Boolean): Coeval[Nothing]

    Permalink

    Creates a new coeval that in case of error will retry executing the source again and again, until it succeeds.

    Creates a new coeval that in case of error will retry executing the source again and again, until it succeeds.

    In case of continuous failure the total number of executions will be maxRetries + 1.

    Definition Classes
    Coeval
  34. def restartUntil(p: (Nothing) ⇒ Boolean): Coeval[Nothing]

    Permalink

    Given a predicate function, keep retrying the coeval until the function returns true.

    Given a predicate function, keep retrying the coeval until the function returns true.

    Definition Classes
    Coeval
  35. def runAttempt: Error

    Permalink

    Evaluates the underlying computation and returns the result or any triggered errors as a Coeval.Attempt.

    Evaluates the underlying computation and returns the result or any triggered errors as a Coeval.Attempt.

    Definition Classes
    ErrorCoeval
  36. def runTry: Try[Nothing]

    Permalink

    Evaluates the underlying computation and returns the result or any triggered errors as a scala.util.Try.

    Evaluates the underlying computation and returns the result or any triggered errors as a scala.util.Try.

    Definition Classes
    Coeval
  37. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  38. def task: Task[Nothing]

    Permalink

    Converts the source Coeval into a Task.

    Converts the source Coeval into a Task.

    Definition Classes
    Coeval
  39. def value: Nothing

    Permalink

    Evaluates the underlying computation and returns the result.

    Evaluates the underlying computation and returns the result.

    NOTE: this can throw exceptions.

    Definition Classes
    ErrorCoeval
  40. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  41. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  42. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  43. def zip[B](that: Coeval[B]): Coeval[(Nothing, B)]

    Permalink

    Zips the values of this and that coeval, and creates a new coeval that will emit the tuple of their results.

    Zips the values of this and that coeval, and creates a new coeval that will emit the tuple of their results.

    Definition Classes
    Coeval
  44. def zipMap[B, C](that: Coeval[B])(f: (Nothing, B) ⇒ C): Coeval[C]

    Permalink

    Zips the values of this and that and applies the given mapping function on their results.

    Zips the values of this and that and applies the given mapping function on their results.

    Definition Classes
    Coeval

Deprecated Value Members

  1. def zipWith[B, C](that: Coeval[B])(f: (Nothing, B) ⇒ C): Coeval[C]

    Permalink
    Definition Classes
    Coeval
    Annotations
    @deprecated
    Deprecated

    (Since version 2.0-RC12) Renamed, please use Coeval.zipMap

Inherited from Attempt[Nothing]

Inherited from Product

Inherited from Equals

Inherited from Coeval[Nothing]

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped