sealed trait Printer[+Err, +Out, -Value] extends AnyRef

A Printer takes a value of type 'Value' and either produces a stream of 'Out' elements and a result value of type 'Result', or fails with a custom error of type 'Err'.

Parsers can be combined with Printers to get Syntax, or a Parser and a Printer can be built simultaneously by using the combinators of Syntax.

Err

Custom error type

Out

Element type of the output stream of printing

Value

The type of the value to be printed

Self Type
Printer[Err, Out, Value]
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Printer
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def *: Printer[Err, Out, Chunk[Value]]

    Symbolic alias for repeat0

  4. final def +: Printer[Err, Out, Chunk[Value]]

    Symbolic alias for repeat

  5. final def <+>[Err2 >: Err, Out2 >: Out, Value2](that: => Printer[Err2, Out2, Value2]): Printer[Err2, Out2, Either[Value, Value2]]

    Symbolic alias for orElseEither

  6. final def <>[Err2 >: Err, Out2 >: Out, Value2 <: Value](that: => Printer[Err2, Out2, Value2]): Printer[Err2, Out2, Value2]

    Symbolic alias for orElse

  7. final def <~[Err2 >: Err, Out2 >: Out](that: => Printer[Err2, Out2, Unit]): Printer[Err2, Out2, Value]

    Symbolic alias for zipLeft

  8. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. final def ?: Printer[Err, Out, Option[Value]]

    Symbolic alias for optional

  10. final def apply(value: Value): Printer[Err, Out, Any]

    Provide this printer it's input value

  11. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  12. final def asPrinted[Value2](matches: Value2, value: Value): Printer[Err, Out, Value2]

    Ignores the printer's result and input and use 'result' and 'value' instead

  13. final def between[Err2 >: Err, Out2 >: Out](left: Printer[Err2, Out2, Unit], right: Printer[Err2, Out2, Unit]): Printer[Err2, Out2, Value]

    Surround this printer with 'left' and 'right', each getting Unit as value to be printed.

  14. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  15. final def contramap[Value2](f: (Value2) => Value): Printer[Err, Out, Value2]

    Maps the printer's input value with function 'f'

  16. final def contramapEither[Err2, Value2](from: (Value2) => Either[Err2, Value]): Printer[Err2, Out, Value2]

    Maps the printer's result with function 'to' and its input value with 'from'.

    Maps the printer's result with function 'to' and its input value with 'from'. Both functions can fail the printer.

  17. final def contramapTo[Err2 >: Err, Value2](from: PartialFunction[Value2, Value], failure: Err2): Printer[Err2, Out, Value2]

    Maps the result of the printer with the function 'to', and the value to be printed with the partial function 'from'.

    Maps the result of the printer with the function 'to', and the value to be printed with the partial function 'from'. It the partial function is not defined on the value, the printer fails with 'failure'.

    This can be used to define separate syntaxes for subtypes, that can be later combined.

  18. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  20. final def filter[E2 >: Err, Value2 <: Value](condition: (Value2) => Boolean, failure: E2): Printer[E2, Out, Value2]

    Specifies a filter condition 'condition' that gets checked on both the printed and the result value and in case it evaluates to false, fails with 'failure'.

  21. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  22. final def flatten(implicit ev1: <:<[Chunk[String], Value]): Printer[Err, Out, String]

    Concatenates a chunk of string to be printed

  23. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  24. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  25. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  26. final def mapError[Err2](f: (Err) => Err2): Printer[Err2, Out, Value]

    Maps the error with function 'f'

  27. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  28. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  29. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  30. final def optional: Printer[Err, Out, Option[Value]]

    Print option values

  31. final def orElse[Err2 >: Err, Out2 >: Out, Value2 <: Value](that: => Printer[Err2, Out2, Value2]): Printer[Err2, Out2, Value2]

    Prints this and if it fails, ignore the printed output and print 'that' instead.

  32. final def orElseEither[Err2 >: Err, Out2 >: Out, Value2](that: => Printer[Err2, Out2, Value2]): Printer[Err2, Out2, Either[Value, Value2]]

    Prints this if the input is 'Left', or print 'that' if the input is 'Right'

  33. final def print(value: Value): Either[Err, Chunk[Out]]

    Print the given 'value' to a chunk of output elements

  34. final def print[Out2 >: Out](value: Value, target: Target[Out2]): Either[Err, Unit]

    Print the given 'value' to the given 'target' implementation

  35. final def printString(value: Value)(implicit ev: <:<[Out, Char]): Either[Err, String]

    Print the given 'value' to a string

  36. final def repeat: Printer[Err, Out, Chunk[Value]]

    Repeats this printer for each element of the input chunk, assuming it has at least one element

  37. final def repeat0: Printer[Err, Out, Chunk[Value]]

    Repeats this printer for each element of the input chunk, zero or more times

  38. final def repeatUntil[Err2 >: Err, Out2 >: Out](stopCondition: Printer[Err2, Out2, Unit]): Printer[Err2, Out2, Chunk[Value]]

    Repeat this printer for each element of the input chunk, verifying the 'stopConfition' after each.

  39. final def repeatWithSep[Err2 >: Err, Out2 >: Out](sep: Printer[Err2, Out2, Unit]): Printer[Err2, Out2, Chunk[Value]]

    Repeats this printer for each element of the input chunk, separated by the 'sep' printer (which gets Unit to be printed)

  40. final def repeatWithSep0[Err2 >: Err, Out2 >: Out](sep: Printer[Err2, Out2, Unit]): Printer[Err2, Out2, Chunk[Value]]

    Repeats this printer for each element of the input chunk that can be empty, separated by the 'sep' printer (which gets Unit to be printed)

  41. final def surroundedBy[Err2 >: Err, Out2 >: Out](other: Printer[Err2, Out2, Unit]): Printer[Err2, Out2, Value]

    Surround this printer with 'other', which will get Unit as value to be printed.

  42. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  43. def toString(): String
    Definition Classes
    AnyRef → Any
  44. final def transformOption[Value2](from: (Value2) => Option[Value]): Printer[Option[Err], Out, Value2]

    Maps the printer's result with function 'to' and its input value with 'from'.

    Maps the printer's result with function 'to' and its input value with 'from'. Both functions can fail the printer. Failure is indicated by None on the error channel.

  45. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  46. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  47. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  48. final def widenWith[Err2 >: Err, Value2](narrow: PartialFunction[Value2, Value], failure: Err2): Printer[Err2, Out, Value2]

    Widen this printer's printed value type by specifying a partial function to narrow it back to the set of supported subtypes.

  49. final def zipLeft[Err2 >: Err, Out2 >: Out](that: => Printer[Err2, Out2, Unit]): Printer[Err2, Out2, Value]

    Print 'that' by providing the unit value to it after printing this.

    Print 'that' by providing the unit value to it after printing this. The result is this printer's result.

  50. final def |[Err2 >: Err, Out2 >: Out, Value2 <: Value](that: => Printer[Err2, Out2, Value2]): Printer[Err2, Out2, Value2]

    Symbolic alias for orElse

Inherited from AnyRef

Inherited from Any

Ungrouped