SelfDescribingData

final case class SelfDescribingData[D](schema: SchemaKey, data: D)

A container for self-describing data, used to eliminate the need for an Option wrapper when extracting a SchemaKey with the typeclasses.ExtractSchemaKey type class.

Type parameters:
D

Any generic type that can represent a piece of self-describing data. (See also typeclasses.ExtractSchemaKey.)

Value parameters:
data

The data blob itself.

schema

A reference to a self-describing schema.

Companion:
object
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Concrete methods

def asString(implicit ev: StringifyData[D]): String

Render a piece of self-describing data into String.

Render a piece of self-describing data into String.

def normalize(implicit ev: NormalizeData[D]): D

Render a piece of self-describing data into its base type D.

Render a piece of self-describing data into its base type D.

Inherited methods

def productElementNames: Iterator[String]
Inherited from:
Product
def productIterator: Iterator[Any]
Inherited from:
Product