io.dylemma.spac.interop.fs2
Provides implicits to allow for interop between the core SPaC classes and fs2 / cats-effect.
Parser
getstoPipe
andparseF
Transformer
getstoPipe
Source
getstoResource
andtoStream
Attributes
Members list
Packages
Type members
Classlikes
Since Parser
is by design a stream consumer, we can provide the parseF
helper which consumes a fs2.Stream
in an effectful way. We can also provide the toPipe
method, which transforms an input fs2.Stream
to a new stream which emits exactly one value or raises an error.
Since Parser
is by design a stream consumer, we can provide the parseF
helper which consumes a fs2.Stream
in an effectful way. We can also provide the toPipe
method, which transforms an input fs2.Stream
to a new stream which emits exactly one value or raises an error.
Attributes
- Supertypes
-
class AnyValtrait Matchableclass Any
Since Source
is a synchronous-only encoding of the Resource
pattern, it can be converted to a cats.effect.Resource
by suspending its open
and close
operations in a Sync effect type F
, yielding an Iterator[A]
as its value.
Since Source
is a synchronous-only encoding of the Resource
pattern, it can be converted to a cats.effect.Resource
by suspending its open
and close
operations in a Sync effect type F
, yielding an Iterator[A]
as its value.
This can be taken a step further by lifting that Resource
to a fs2.Stream
and wrapping the provided Iterator as a stream, to treat the whole Source[A]
as a fs2.Stream[F, A]
Attributes
- Supertypes
-
class AnyValtrait Matchableclass Any
Since a Transformer
is by design a stream transformation, we can naturally provide a conversion from Transformer
to fs2.Pipe
Since a Transformer
is by design a stream transformation, we can naturally provide a conversion from Transformer
to fs2.Pipe
Attributes
- Supertypes
-
class AnyValtrait Matchableclass Any
Implicits
Implicits
Since Parser
is by design a stream consumer, we can provide the parseF
helper which consumes a fs2.Stream
in an effectful way. We can also provide the toPipe
method, which transforms an input fs2.Stream
to a new stream which emits exactly one value or raises an error.
Since Parser
is by design a stream consumer, we can provide the parseF
helper which consumes a fs2.Stream
in an effectful way. We can also provide the toPipe
method, which transforms an input fs2.Stream
to a new stream which emits exactly one value or raises an error.
Attributes
Since Source
is a synchronous-only encoding of the Resource
pattern, it can be converted to a cats.effect.Resource
by suspending its open
and close
operations in a Sync effect type F
, yielding an Iterator[A]
as its value.
Since Source
is a synchronous-only encoding of the Resource
pattern, it can be converted to a cats.effect.Resource
by suspending its open
and close
operations in a Sync effect type F
, yielding an Iterator[A]
as its value.
This can be taken a step further by lifting that Resource
to a fs2.Stream
and wrapping the provided Iterator as a stream, to treat the whole Source[A]
as a fs2.Stream[F, A]
Attributes
Since a Transformer
is by design a stream transformation, we can naturally provide a conversion from Transformer
to fs2.Pipe
Since a Transformer
is by design a stream transformation, we can naturally provide a conversion from Transformer
to fs2.Pipe