SimpleCodec

zio.http.codec.SimpleCodec
See theSimpleCodec companion object
sealed trait SimpleCodec[Input, Output] extends PartialFunction[Input, Output]

A simple codec is either equal to a given value, or unconstrained within a domain of values. There are no other possibilities.

Attributes

Companion
object
Graph
Supertypes
trait PartialFunction[Input, Output]
trait Input => Output
class Object
trait Matchable
class Any
Known subtypes
class Specified[A]
class Unspecified[A]

Members list

Value members

Abstract methods

def decode(input: Input): Either[String, Output]
def encode(output: Output): Input
def isDefinedAt(input: Input): Boolean

Inherited methods

def andThen[C](k: PartialFunction[Output, C]): PartialFunction[A, C]

Attributes

Inherited from:
PartialFunction
override def andThen[C](k: Output => C): PartialFunction[A, C]

Attributes

Definition Classes
PartialFunction -> Function1
Inherited from:
PartialFunction
def apply(v1: Input): R

Attributes

Inherited from:
Function1
def applyOrElse[A1 <: Input, B1 >: Output](x: A1, default: A1 => B1): B1

Attributes

Inherited from:
PartialFunction
def compose[R](k: PartialFunction[R, Input]): PartialFunction[R, B]

Attributes

Inherited from:
PartialFunction
def compose[A](g: A => Input): A => R

Attributes

Inherited from:
Function1
def elementWise: ElementWiseExtractor[A, B]

Attributes

Inherited from:
PartialFunction
def lift: A => Option[B]

Attributes

Inherited from:
PartialFunction
def orElse[A1 <: Input, B1 >: Output](that: PartialFunction[A1, B1]): PartialFunction[A1, B1]

Attributes

Inherited from:
PartialFunction
def runWith[U](action: Output => U): A => Boolean

Attributes

Inherited from:
PartialFunction
override def toString(): String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Function1 -> Any
Inherited from:
Function1
def unapply(a: Input): Option[B]

Attributes

Inherited from:
PartialFunction