fs2
package fs2
- Source
- fs2.scala
- Alphabetic
- By Inheritance
- fs2
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
trait
Async
[F[_]] extends Effect[F]
- Annotations
- @implicitNotFound( ... )
-
trait
Chunk
[+A] extends AnyRef
Chunk represents a strict, in-memory sequence of
A
values. -
type
Pipe[F[_], -I, +O] = (Stream[F, I]) ⇒ Stream[F, O]
A pipe is a stream transformation, represented as a function from stream to stream.
A pipe is a stream transformation, represented as a function from stream to stream.
Pipes are typically applied with the
through
operation onStream
. -
type
Pipe2[F[_], -I, -I2, +O] = (Stream[F, I], Stream[F, I2]) ⇒ Stream[F, O]
A
Pipe2
is a stream transformation that combines two strings in to a single stream, represented as a function from stream to stream.A
Pipe2
is a stream transformation that combines two strings in to a single stream, represented as a function from stream to stream.Pipe2
s are typically applied with thethrough2
operation onStream
. - class Pull [+F[_], +O, +R] extends PullOps[F, O, R]
- trait PullDerived extends AnyRef
-
trait
Pulls
[Pull[+_[_], +_, +_]] extends AnyRef
Laws:
Laws:
or
forms a monoid in conjunction withdone
:or(done, p) == p
andor(p, done) == p
.or(or(p1,p2), p3) == or(p1, or(p2,p3))
fail
is caught byonError
:onError(fail(e))(f) == f(e)
Pull
forms a monad withpure
andflatMap
:pure >=> f == f
f >=> pure == f
(f >=> g) >=> h == f >=> (g >=> h)
wheref >=> g
is defined asa => a flatMap f flatMap g
-
sealed
trait
Pure
[+A] extends AnyRef
Marker trait.
Marker trait. A
Stream[Pure,O]
can be safely cast to aStream[Nothing,O]
, but theStream[Pure,O]
has better type inference properties in some places. See usage inStream.pull
. -
trait
Scheduler
extends AnyRef
Provides the ability to schedule evaluation of thunks in the future.
- case class Scope [+F[_], +O](get: Free[[x]RF[F, x], O]) extends Product with Serializable
-
type
Sink[F[_], -I] = (Stream[F, I]) ⇒ Stream[F, Unit]
A sink is a pipe that converts a stream to a
Stream[F,Unit]
.A sink is a pipe that converts a stream to a
Stream[F,Unit]
.Sinks are typically applied with the
to
operation onStream
. - case class Step [+A, +B](head: A, tail: B) extends Product with Serializable
-
trait
Strategy
extends AnyRef
Provides a function for evaluating thunks, possibly asynchronously.
-
abstract
class
Stream
[+F[_], +O] extends StreamOps[F, O]
A stream producing output of type
O
, which may evaluateF
effects.A stream producing output of type
O
, which may evaluateF
effects. IfF
isNothing
orfs2.Pure
, the stream is pure. -
trait
Streams
[Stream[+_[_], +_]] extends AnyRef
Laws (using infix syntax):
Laws (using infix syntax):
append
forms a monoid in conjunction withempty
:empty append p == p
andp append empty == p
.(p1 append p2) append p3 == p1 append (p2 append p3)
And
push
is consistent with usingappend
to prepend a single chunk:push(c)(s) == chunk(c) append s
fail
propagates until being caught byonError
:fail(e) onError h == h(e)
fail(e) append s == fail(e)
fail(e) flatMap f == fail(e)
Stream
forms a monad withemit
andflatMap
:emit >=> f == f
f >=> emit == f
(f >=> g) >=> h == f >=> (g >=> h)
whereemit(a)
is defined aschunk(Chunk.singleton(a)) and
f >=> gis defined as
a => a flatMap f flatMap gThe monad is the list-style sequencing monad:
(a append b) flatMap f == (a flatMap f) append (b flatMap f)
empty flatMap f == empty
- trait Trace extends AnyRef
Value Members
- object #:
- object Async
- object Chunk
- object Pull extends Pulls[Pull] with PullDerived with pull1
- object Scheduler
- object Scope extends Serializable
- object Strategy
- object Stream extends Streams[Stream] with StreamDerived
- object Trace
- object compress
- object concurrent
- object pipe
- object pipe2
- object task
- object text