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
c

io.dylemma.spac.interop.fs2

TransformerFs2Ops

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

Source
package.scala
Linear Supertypes
AnyVal, Any
Ordering
  1. Grouped
  2. Alphabetic
  3. By Inheritance
Inherited
  1. TransformerFs2Ops
  2. AnyVal
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new TransformerFs2Ops(transformer: Transformer[In, Out])

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    Any
  2. final def ##: Int
    Definition Classes
    Any
  3. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from TransformerFs2Ops[In, Out] toany2stringadd[TransformerFs2Ops[In, Out]] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (TransformerFs2Ops[In, Out], B)
    Implicit
    This member is added by an implicit conversion from TransformerFs2Ops[In, Out] toArrowAssoc[TransformerFs2Ops[In, Out]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def ensuring(cond: (TransformerFs2Ops[In, Out]) => Boolean, msg: => Any): TransformerFs2Ops[In, Out]
    Implicit
    This member is added by an implicit conversion from TransformerFs2Ops[In, Out] toEnsuring[TransformerFs2Ops[In, Out]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  8. def ensuring(cond: (TransformerFs2Ops[In, Out]) => Boolean): TransformerFs2Ops[In, Out]
    Implicit
    This member is added by an implicit conversion from TransformerFs2Ops[In, Out] toEnsuring[TransformerFs2Ops[In, Out]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  9. def ensuring(cond: Boolean, msg: => Any): TransformerFs2Ops[In, Out]
    Implicit
    This member is added by an implicit conversion from TransformerFs2Ops[In, Out] toEnsuring[TransformerFs2Ops[In, Out]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  10. def ensuring(cond: Boolean): TransformerFs2Ops[In, Out]
    Implicit
    This member is added by an implicit conversion from TransformerFs2Ops[In, Out] toEnsuring[TransformerFs2Ops[In, Out]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def getClass(): Class[_ <: AnyVal]
    Definition Classes
    AnyVal → Any
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. def toPipe[F[_]](implicit pos: CallerPos): Pipe[F, In, Out]

    Convert this transformer to a Pipe which will apply this transformer's logic to an fs2 Stream.

    Convert this transformer to a Pipe which will apply this transformer's logic to an fs2 Stream.

    F

    Effect type for the Pipe/Stream

    pos

    Captures the caller filename and line number, used to fill in the 'spac trace' if the parser throws an exception

    returns

    An fs2.Pipe[F, In, Out] that will apply this transformer's logic

  14. def toString(): String
    Definition Classes
    Any

Deprecated Value Members

  1. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from TransformerFs2Ops[In, Out] toStringFormat[TransformerFs2Ops[In, Out]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.12.16) Use formatString.format(value) instead of value.formatted(formatString), or use the f"" string interpolator. In Java 15 and later, formatted resolves to the new method in String which has reversed parameters.

  2. def [B](y: B): (TransformerFs2Ops[In, Out], B)
    Implicit
    This member is added by an implicit conversion from TransformerFs2Ops[In, Out] toArrowAssoc[TransformerFs2Ops[In, Out]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use -> instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.

Inherited from AnyVal

Inherited from Any

Inherited by implicit conversion any2stringadd fromTransformerFs2Ops[In, Out] to any2stringadd[TransformerFs2Ops[In, Out]]

Inherited by implicit conversion StringFormat fromTransformerFs2Ops[In, Out] to StringFormat[TransformerFs2Ops[In, Out]]

Inherited by implicit conversion Ensuring fromTransformerFs2Ops[In, Out] to Ensuring[TransformerFs2Ops[In, Out]]

Inherited by implicit conversion ArrowAssoc fromTransformerFs2Ops[In, Out] to ArrowAssoc[TransformerFs2Ops[In, Out]]

transform

Ungrouped