Packages

  • package root
    Definition Classes
    root
  • package io
    Definition Classes
    root
  • package dylemma
    Definition Classes
    io
  • package spac

    SPaC (short for "Streaming Parser Combinators") is a library for building stream consumers in a declarative style, specialized for tree-like data types like XML and JSON.

    SPaC (short for "Streaming Parser Combinators") is a library for building stream consumers in a declarative style, specialized for tree-like data types like XML and JSON.

    Many utilities for handling XML and JSON data involve parsing the entire "document" to some DOM model, then inspecting and transforming that model to extract information. The downside to these utilities is that when the document is very large, the DOM may not fit in memory. The workaround for this type of problem is to treat the document as a stream of "events", e.g. "StartElement" and "EndElement" for XML, or "StartObject" and "EndObject" for JSON. The downside to this workaround is that writing code to handle these streams can be complicated and error-prone, especially when the DOM is complicated.

    SPaC's goal is to drastically simplify the process of creating code to handle these streams.

    This package contains the "core" SPaC traits; Parser, Transformer, Splitter, and ContextMatcher.

    See the xml and json subpackages (provided by the xml-spac and json-spac libraries respectively) for specific utilities related to handling XML and JSON event streams.

    Definition Classes
    dylemma
  • package interop
    Definition Classes
    spac
  • package fs2

    Provides implicits to allow for interop between the core SPaC classes and fs2 / cats-effect.

    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

    Definition Classes
    interop
  • ParserFs2Ops
  • SourceFs2Ops
  • TransformerFs2Ops

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
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. fs2
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. implicit final class ParserFs2Ops[In, Out] extends AnyVal

    Since Parser is by design a stream consumer, we can provide the parseF helper which consumes a fs2.Stream in an effectful way.

    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.

  2. implicit final class SourceFs2Ops[A] extends AnyVal

    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]

  3. implicit final class TransformerFs2Ops[In, Out] extends AnyVal

    Since a Transformer is by design a stream transformation, we can naturally provide a conversion from Transformer to fs2.Pipe

Value Members

  1. implicit def unconsableForFs2Chunk: Unconsable[Chunk]

Inherited from AnyRef

Inherited from Any

Ungrouped