zio.http.codec.TextCodec
See theTextCodec companion object
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.
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
trait PartialFunction[String, A]trait String => Aclass Objecttrait Matchableclass Any
- Known subtypes
-
object BooleanCodec.typeclass Constantobject IntCodec.typeobject LongCodec.typeobject StringCodec.typeobject UUIDCodec.type
- Self type
-
TextCodec[A]
Members list
In this article