QueryCodec

zio.http.schema.QueryCodec
See theQueryCodec companion object
abstract class QueryCodec[A] extends Codec[QueryParams, QueryParamsBuilder, A]

A codec for encoding a value of type A into zio.http.QueryParams and decoding zio.http.QueryParams back into A.

Instances are typically derived via QueryFormat using the schema derivation framework.

Attributes

Companion
object
Source
QueryCodec.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

final def encodeToQueryParams(value: A): QueryParams

Attributes

Source
QueryCodec.scala

Inherited and Abstract methods

def decode(input: QueryParams): Either[SchemaError, A]

Decodes the specified input into a value of the target type.

Decodes the specified input into a value of the target type.

Value parameters

input

The input data that needs to be decoded.

Attributes

Returns

Either a SchemaError indicating the decoding failure, or a decoded value.

Inherited from:
Codec
Source
Codec.scala
def encode(value: A, output: QueryParamsBuilder): Unit

Encodes the given value into the specified output representation.

Encodes the given value into the specified output representation.

Value parameters

output

The target output into which the value will be encoded.

value

The value to be encoded.

Attributes

Returns

This method does not return a value.

Inherited from:
Codec
Source
Codec.scala