sealed trait TextCodec[A] extends PartialFunction[String, A]

A zio.http.codec.TextCodec defines a codec for a text fragment. The text fragment can be decoded into a value, or the value can be encoded into a text fragment.

Unlike parsers, text codecs operate on entire fragments. They do not consume input and leave remainders. Also unlike parsers, text codecs do not fail with error messages, but rather, simply return None if they do not succeed in decoding from a given text fragment. Finally, unlike ordinary parsers, text codecs are fully invertible, and can therefore be used in client generation.

Self Type
TextCodec[A]
Linear Supertypes
PartialFunction[String, A], (String) => A, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TextCodec
  2. PartialFunction
  3. Function1
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def apply(value: String): A
    Definition Classes
    TextCodec → Function1
  2. abstract def describe: String
  3. abstract def encode(value: A): String
  4. abstract def isDefinedAt(value: String): Boolean
    Definition Classes
    TextCodec → PartialFunction

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def andThen[C](k: PartialFunction[A, C]): PartialFunction[String, C]
    Definition Classes
    PartialFunction
  5. def andThen[C](k: (A) => C): PartialFunction[String, C]
    Definition Classes
    PartialFunction → Function1
  6. def applyOrElse[A1 <: String, B1 >: A](x: A1, default: (A1) => B1): B1
    Definition Classes
    PartialFunction
  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  9. def compose[R](k: PartialFunction[R, String]): PartialFunction[R, A]
    Definition Classes
    PartialFunction
  10. def compose[A](g: (A) => String): (A) => A
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  11. final def decode(value: String): Option[A]
  12. def elementWise: ElementWiseExtractor[String, A]
    Definition Classes
    PartialFunction
  13. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  15. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  16. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  17. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  18. def lift: (String) => Option[A]
    Definition Classes
    PartialFunction
  19. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  21. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  22. def orElse[A1 <: String, B1 >: A](that: PartialFunction[A1, B1]): PartialFunction[A1, B1]
    Definition Classes
    PartialFunction
  23. def runWith[U](action: (A) => U): (String) => Boolean
    Definition Classes
    PartialFunction
  24. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  25. def toString(): String
    Definition Classes
    Function1 → AnyRef → Any
  26. def unapply(a: String): Option[A]
    Definition Classes
    PartialFunction
  27. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  28. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  29. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from PartialFunction[String, A]

Inherited from (String) => A

Inherited from AnyRef

Inherited from Any

Ungrouped