package fs2
Provides implicits to allow for interop between the core SPaC classes and fs2 / cats-effect.
- Parser gets toPipe and parseF
- Transformer gets toPipe
- Source gets toResource and toStream
- Source
- package.scala
- Alphabetic
- By Inheritance
- fs2
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- implicit final class ParserFs2Ops[In, Out] extends AnyVal
Since
Parseris by design a stream consumer, we can provide theparseFhelper which consumes afs2.Streamin an effectful way.Since
Parseris by design a stream consumer, we can provide theparseFhelper which consumes afs2.Streamin an effectful way. We can also provide thetoPipemethod, which transforms an inputfs2.Streamto a new stream which emits exactly one value or raises an error. - implicit final class SourceFs2Ops[A] extends AnyVal
Since
Sourceis a synchronous-only encoding of theResourcepattern, it can be converted to acats.effect.Resourceby suspending itsopenandcloseoperations in a Sync effect typeF, yielding anIterator[A]as its value.Since
Sourceis a synchronous-only encoding of theResourcepattern, it can be converted to acats.effect.Resourceby suspending itsopenandcloseoperations in a Sync effect typeF, yielding anIterator[A]as its value.This can be taken a step further by lifting that
Resourceto afs2.Streamand wrapping the provided Iterator as a stream, to treat the wholeSource[A]as afs2.Stream[F, A] - implicit final class TransformerFs2Ops[In, Out] extends AnyVal
Since a
Transformeris by design a stream transformation, we can naturally provide a conversion fromTransformertofs2.Pipe
Value Members
- implicit def unconsableForFs2Chunk: Unconsable[Chunk]