fs2-docs
Members list
Packages
Provides several concurrency primitives. *
Provides several concurrency primitives. *
Attributes
Implementation of the reactive-streams protocol for fs2; based on Java Flow.
Implementation of the reactive-streams protocol for fs2; based on Java Flow.
Attributes
- See also:
java.util.concurrent.Flow
- Example:
scala> import cats.effect.{IO, Resource} scala> import fs2.Stream scala> import fs2.interop.flow.syntax._ scala> import java.util.concurrent.Flow.Publisher scala> scala> val upstream: Stream[IO, Int] = Stream(1, 2, 3).covary[IO] scala> val publisher: Resource[IO, Publisher[Int]] = upstream.toPublisher scala> val downstream: Stream[IO, Int] = Stream.resource(publisher).flatMap { publisher => | publisher.toStream[IO](chunkSize = 16) | } scala> scala> import cats.effect.unsafe.implicits.global scala> downstream.compile.toVector.unsafeRunSync() res0: Vector[Int] = Vector(1, 2, 3)
Implementation of the reactivestreams protocol for fs2
Implementation of the reactivestreams protocol for fs2
Attributes
- See also:
- Example:
scala> import fs2._ scala> import fs2.interop.reactivestreams._ scala> import cats.effect.{IO, Resource}, cats.effect.unsafe.implicits.global scala> scala> val upstream: Stream[IO, Int] = Stream(1, 2, 3).covary[IO] scala> val publisher: Resource[IO, StreamUnicastPublisher[IO, Int]] = upstream.toUnicastPublisher scala> val downstream: Stream[IO, Int] = Stream.resource(publisher).flatMap(_.toStreamBuffered[IO](bufferSize = 16)) scala> scala> downstream.compile.toVector.unsafeRunSync() res0: Vector[Int] = Vector(1, 2, 3)
Provides various ways to work with streams that perform IO.
Provides various ways to work with streams that perform IO.
Attributes
Provides support for working with files.
Provides support for working with files.
Attributes
Provides support for doing network I/O -- TCP, UDP, and TLS.
Provides support for doing network I/O -- TCP, UDP, and TLS.
Attributes
Protocol that describes libpcap files.
Protocol that describes libpcap files.
Attributes
- See also: