ObservableLike

@implicitNotFound("Cannot find implicit value for ObservableLike[${F}].\nBuilding this implicit value might depend on having an implicit\ns.c.ExecutionContext in scope, a Scheduler or some equivalent type.")
trait ObservableLike[F[_]] extends FunctionK[F, Observable]

A lawless type class that provides conversions to Observable.

Sample:

 // Conversion from cats.Eval
 import cats.Eval

 val source0 = Eval.always(1 + 1)
 val task0 = ObservableLike[Eval].apply(source0)

 // Conversion from Future
 import scala.concurrent.Future

 val source1 = Future.successful(1 + 1)
 val task1 = ObservableLike[Future].apply(source1)

 // Conversion from IO
 import cats.effect.IO

 val source2 = IO(1 + 1)
 val task2 = ObservableLike[IO].apply(source2)

See Observable.from

Companion:
object
trait Serializable
class Object
trait Matchable
class Any

Value members

Abstract methods

def apply[A](fa: F[A]): Observable[A]

Converts from F[A] to Observable[A], preserving referential transparency if F[_] is a pure data type and preserving interruptibility if the source is cancelable.

Converts from F[A] to Observable[A], preserving referential transparency if F[_] is a pure data type and preserving interruptibility if the source is cancelable.

Deprecated methods

@deprecated("Switch to ObservableLike.apply", since = "3.0.0-RC3")
def toObservable[A](observable: F[A]): Observable[A]
Implicitly added by Deprecated

DEPRECATED — switch to ObservableLike.apply.

DEPRECATED — switch to ObservableLike.apply.

Deprecated
[Since version 3.0.0-RC3]

Inherited methods

def and[H[_]](h: FunctionK[F, H]): FunctionK[F, [_] =>> Tuple2K[Observable, H, _$9]]

Composes two instances of FunctionK into a new FunctionK that transforms one single functor to a cats.data.Tuple2K of two functors.

Composes two instances of FunctionK into a new FunctionK that transforms one single functor to a cats.data.Tuple2K of two functors.

scala> import cats.arrow.FunctionK
scala> val list2option = λ[FunctionK[List, Option]](_.headOption)
scala> val list2vector = λ[FunctionK[List, Vector]](_.toVector)
scala> val optionAndVector = list2option and list2vector
scala> optionAndVector(List(1,2,3))
res0: cats.data.Tuple2K[Option,Vector,Int] = Tuple2K(Some(1),Vector(1, 2, 3))
Inherited from:
FunctionK
def andThen[H[_]](f: FunctionK[Observable, H]): FunctionK[F, H]

Composes two instances of FunctionK into a new FunctionK with this transformation applied first.

Composes two instances of FunctionK into a new FunctionK with this transformation applied first.

Inherited from:
FunctionK
def compose[E[_]](f: FunctionK[E, F]): FunctionK[E, Observable]

Composes two instances of FunctionK into a new FunctionK with this transformation applied last.

Composes two instances of FunctionK into a new FunctionK with this transformation applied last.

Inherited from:
FunctionK
def narrow[F0 <: (F)]: FunctionK[F0, Observable]

Narrows the input type of this FunctionK from F to F0

Narrows the input type of this FunctionK from F to F0

Inherited from:
FunctionK
def or[H[_]](h: FunctionK[H, Observable]): FunctionK[[_] =>> EitherK[F, H, _$6], Observable]

Composes two instances of FunctionK into a new FunctionK that transforms a cats.data.EitherK to a single functor.

Composes two instances of FunctionK into a new FunctionK that transforms a cats.data.EitherK to a single functor.

This transformation will be used to transform left F values while h will be used to transform right H values.

Inherited from:
FunctionK
def widen[G0[x]]: FunctionK[F, G0]

Widens the output type of this FunctionK from G to G0

Widens the output type of this FunctionK from G to G0

Inherited from:
FunctionK

Concrete fields

Implicitly added by Deprecated