Metadata

object Metadata
Companion:
class
trait Product
trait Mirror
class Object
trait Matchable
class Any

Type members

Classlikes

trait Access
object Encoder
Companion:
class
trait Encoder[A]
Companion:
object
Companion:
class

Reads metadata and produces a map that contains values extracted from it, labelled by field names.

Reads metadata and produces a map that contains values extracted from it, labelled by field names.

Companion:
object
Companion:
class
trait TotalDecoder[A]

Reads metadata and produces a value. Cannot be produced implicitly from a schema, as the required information is not available at the typelevel.

Reads metadata and produces a value. Cannot be produced implicitly from a schema, as the required information is not available at the typelevel.

Companion:
object

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Inherited from:
Mirror

The name of the type

The name of the type

Inherited from:
Mirror

Value members

Concrete methods

def decodePartial[A](metadata: Metadata)(implicit decoder: PartialDecoder[A]): Either[MetadataError, MetadataPartial[A]]

Decodes all the fields that are bound to http metadata, shoving values in a map.

Decodes all the fields that are bound to http metadata, shoving values in a map.

def decodeTotal[A](metadata: Metadata)(implicit decoder: PartialDecoder[A]): Option[Either[MetadataError, A]]

If possible, attempts to decode the whole data from http metadata. This will only return a non-empty value when all fields of the datatype are bound to http metadata (ie path parameters, headers, query)

If possible, attempts to decode the whole data from http metadata. This will only return a non-empty value when all fields of the datatype are bound to http metadata (ie path parameters, headers, query)

Returns:

None when the value cannot be decoded just from metadata

def encode[A](a: A)(implicit encoder: Encoder[A]): Metadata
def fold[A](i: Iterable[A])(f: A => Metadata): Metadata

Concrete fields