Packages

  • package root
    Definition Classes
    root
  • package fs2
    Definition Classes
    root
  • package interop
    Definition Classes
    fs2
  • package reactivestreams

    Implementation of the reactivestreams protocol for fs2

    Implementation of the reactivestreams protocol for fs2

    Example:
    1. scala> import fs2._
      scala> import fs2.interop.reactivestreams._
      scala> import cats.effect.{ContextShift, IO}
      scala> import scala.concurrent.ExecutionContext
      scala>
      scala> implicit val contextShift: ContextShift[IO] = IO.contextShift(ExecutionContext.global)
      scala>
      scala> val upstream: Stream[IO, Int] = Stream(1, 2, 3).covary[IO]
      scala> val publisher: StreamUnicastPublisher[IO, Int] = upstream.toUnicastPublisher
      scala> val downstream: Stream[IO, Int] = publisher.toStream[IO]
      scala>
      scala> downstream.compile.toVector.unsafeRunSync()
      res0: Vector[Int] = Vector(1, 2, 3)
    See also

    http://www.reactive-streams.org/

p

fs2

interop

package interop

Package Members

  1. package reactivestreams

    Implementation of the reactivestreams protocol for fs2

    Implementation of the reactivestreams protocol for fs2

    Example:
    1. scala> import fs2._
      scala> import fs2.interop.reactivestreams._
      scala> import cats.effect.{ContextShift, IO}
      scala> import scala.concurrent.ExecutionContext
      scala>
      scala> implicit val contextShift: ContextShift[IO] = IO.contextShift(ExecutionContext.global)
      scala>
      scala> val upstream: Stream[IO, Int] = Stream(1, 2, 3).covary[IO]
      scala> val publisher: StreamUnicastPublisher[IO, Int] = upstream.toUnicastPublisher
      scala> val downstream: Stream[IO, Int] = publisher.toStream[IO]
      scala>
      scala> downstream.compile.toVector.unsafeRunSync()
      res0: Vector[Int] = Vector(1, 2, 3)
    See also

    http://www.reactive-streams.org/

Ungrouped