object Callback extends Serializable
- Source
- Callback.scala
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- Callback
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Type Members
-
implicit final
class
Extensions
[-A] extends AnyVal
Useful extension methods for Callback.
Value Members
-
def
async[A](cb: Callback[A])(implicit s: Scheduler): Callback[A]
Given a Callback wraps it into an implementation that calls
onSuccess
andonError
asynchronously, using the givenExecutionContext
. -
def
empty[T](implicit r: UncaughtExceptionReporter): Callback[T]
Creates an empty Callback, a callback that doesn't do anything in
onNext
and that logs errors inonError
with the provided monix.execution.UncaughtExceptionReporter. -
def
fromPromise[A](p: Promise[A]): Callback[A]
Returns a Callback instance that will complete the given promise.
-
def
safe[T](cb: Callback[T])(implicit r: UncaughtExceptionReporter): Callback[T]
Wraps any Callback into a safer implementation that protects against grammar violations (e.g.
Wraps any Callback into a safer implementation that protects against grammar violations (e.g.
onSuccess
oronError
must be called at most once). For usage inrunAsync
.
This is the API documentation for the Monix library.
Package Overview
monix.execution exposes lower level primitives for dealing with asynchronous execution:
Atomic
types, as alternative tojava.util.concurrent.atomic
monix.eval is for dealing with evaluation of results, thus exposing Task and Coeval.
monix.reactive exposes the
Observable
pattern:Observable
implementationsmonix.types implements type-class shims, to be translated to type-classes provided by libraries such as Cats or Scalaz.
monix.cats is the optional integration with the Cats library, providing translations for the types described in
monix.types
.monix.scalaz is the optional integration with the Scalaz library, providing translations for the types described in
monix.types
.