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. All

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: (A) ⇒ C): PartialFunction[String, C]
    Definition Classes
    PartialFunction → Function1
  5. def applyOrElse[A1 <: String, B1 >: A](x: A1, default: (A1) ⇒ B1): B1
    Definition Classes
    PartialFunction
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @IntrinsicCandidate()
  8. def compose[A](g: (A) ⇒ String): (A) ⇒ A
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  9. final def decode(value: String): Option[A]
  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  12. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  13. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  14. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  15. def lift: (String) ⇒ Option[A]
    Definition Classes
    PartialFunction
  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  18. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  19. def orElse[A1 <: String, B1 >: A](that: PartialFunction[A1, B1]): PartialFunction[A1, B1]
    Definition Classes
    PartialFunction
  20. def runWith[U](action: (A) ⇒ U): (String) ⇒ Boolean
    Definition Classes
    PartialFunction
  21. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  22. def toString(): String
    Definition Classes
    Function1 → AnyRef → Any
  23. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  25. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

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