object FutureLift extends FutureLiftForPlatform with Serializable
- Source
- FutureLift.scala
- Alphabetic
- By Inheritance
- FutureLift
- Serializable
- FutureLiftForPlatform
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- implicit class Deprecated[F[_], Future[_]] extends AnyRef
Deprecated method, which happened on extending
FunctionK
. - trait Syntax[F[_], Future[_], A] extends Any
Provides extension methods when imported in scope via syntax.
Provides extension methods when imported in scope via syntax.
import monix.catnap.syntax._
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
- def apply[F[_], Future[_]](implicit F: FutureLift[F, Future]): FutureLift[F, Future]
Accessor for FutureLift values that are in scope.
Accessor for FutureLift values that are in scope.
import cats.effect.IO import scala.concurrent.Future import scala.concurrent.ExecutionContext.Implicits.global val F = FutureLift[IO, Future] val task: IO[Int] = F.apply(IO(Future(1 + 1)))
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def from[F[_], Future[_], A](fa: F[Future[A]])(implicit F: FutureLift[F, Future]): F[A]
Applies FutureLift.apply to the given parameter.
Applies FutureLift.apply to the given parameter.
import cats.effect.IO import scala.concurrent.Future import scala.concurrent.ExecutionContext.Implicits.global val ioa = FutureLift.from(IO(Future(1 + 1)))
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- implicit def javaCompletableLiftForConcurrentOrAsync[F[_]](implicit F: OrElse[Concurrent[F], Async[F]]): FutureLift[F, CompletableFuture]
Implicit instance of FutureLift for converting from
java.util.concurrent.CompletableFuture
to anyConcurrent
orAsync
data type.Implicit instance of FutureLift for converting from
java.util.concurrent.CompletableFuture
to anyConcurrent
orAsync
data type.- Definition Classes
- FutureLiftForPlatform
- def javaCompletableToAsync[F[_], A](fa: F[CompletableFuture[A]])(implicit F: Async[F]): F[A]
Lifts Java's
java.util.concurrent.CompletableFuture
to any data type implementingcats.effect.Async
.Lifts Java's
java.util.concurrent.CompletableFuture
to any data type implementingcats.effect.Async
.- Definition Classes
- FutureLiftForPlatform
- def javaCompletableToConcurrent[F[_], A](fa: F[CompletableFuture[A]])(implicit F: Concurrent[F]): F[A]
Lifts Java's
java.util.concurrent.CompletableFuture
to any data type implementingcats.effect.Concurrent
.Lifts Java's
java.util.concurrent.CompletableFuture
to any data type implementingcats.effect.Concurrent
.- Definition Classes
- FutureLiftForPlatform
- def javaCompletableToConcurrentOrAsync[F[_], A](fa: F[CompletableFuture[A]])(implicit F: OrElse[Concurrent[F], Async[F]]): F[A]
A generic function that subsumes both javaCompletableToConcurrent and javaCompletableToAsync.
A generic function that subsumes both javaCompletableToConcurrent and javaCompletableToAsync.
- Definition Classes
- FutureLiftForPlatform
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- implicit def scalaFutureLiftForConcurrentOrAsync[F[_], MF[T] <: Future[T]](implicit F: OrElse[Concurrent[F], Async[F]]): FutureLift[F, MF]
Implicit instance of FutureLift for converting from scala.concurrent.Future or monix.execution.CancelableFuture to any
Concurrent
orAsync
data type. - def scalaToAsync[F[_], MF[T] <: Future[T], A](fa: F[MF[A]])(implicit F: Async[F]): F[A]
Utility for converting Future values into data types that implement cats.effect.Async.
Utility for converting Future values into data types that implement cats.effect.Async.
N.B. the implementation discriminates CancelableFuture via sub-typing, and if the given future is cancelable, then the resulting instance is also cancelable.
- def scalaToConcurrent[F[_], MF[T] <: Future[T], A](fa: F[MF[A]])(implicit F: Concurrent[F]): F[A]
Utility for converting Future values into data types that implement cats.effect.Concurrent.
Utility for converting Future values into data types that implement cats.effect.Concurrent.
N.B. the implementation discriminates CancelableFuture via sub-typing, and if the given future is cancelable, then the resulting instance is also cancelable.
- def scalaToConcurrentOrAsync[F[_], MF[T] <: Future[T], A](fa: F[MF[A]])(implicit F: OrElse[Concurrent[F], Async[F]]): F[A]
A generic function that subsumes both scalaToAsync and scalaToConcurrent.
A generic function that subsumes both scalaToAsync and scalaToConcurrent.
N.B. this works with monix.execution.CancelableFuture if the given
Future
is such an instance. - final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
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.catnap exposes pure abstractions built on top of the Cats-Effect type classes:
monix.eval is for dealing with evaluation of results, thus exposing Task and Coeval.
monix.reactive exposes the
Observable
pattern:Observable
implementationsmonix.tail exposes Iterant for purely functional pull based streaming:
Batch
andBatchCursor
, the alternatives to Scala'sIterable
andIterator
respectively that we are using within Iterant's encodingYou can control evaluation with type you choose - be it Task, Coeval, cats.effect.IO or your own as long as you provide correct cats-effect or cats typeclass instance.