SchemaRepr

zio.blocks.schema.SchemaRepr
See theSchemaRepr companion object
sealed trait SchemaRepr

A lightweight representation of schema structure for pattern matching in search optics.

SchemaRepr captures the shape of a type without runtime bindings, enabling structural matching against DynamicValue instances.

Attributes

Companion
object
Source
SchemaRepr.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Map
class Nominal
class Optional
class Primitive
class Record
class Sequence
class Variant
object Wildcard
Show all

Members list

Value members

Concrete methods

override def toString: String

Renders this schema representation as a parseable string.

Renders this schema representation as a parseable string.

Examples:

  • Nominal("Person") → "Person"
  • Primitive("string") → "string"
  • Record(...) → "record { name: string, age: int }"
  • Variant(...) → "variant { Left: int, Right: string }"
  • Sequence(...) → "list(string)"
  • Map(...) → "map(string, int)"
  • Optional(...) → "option(Person)"
  • Wildcard → "_"

Attributes

Definition Classes
Any
Source
SchemaRepr.scala