Enum

zio.schema.Schema$.Enum
sealed trait Enum[Z] extends Schema[Z]

Attributes

Graph
Supertypes
trait Schema[Z]
class Object
trait Matchable
class Any
Known subtypes
class Enum1[A, Z]
class Enum10[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Z]
class Enum11[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Z]
class Enum12[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Z]
class Enum13[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Z]
class Enum14[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Z]
class Enum15[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Z]
class Enum16[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, Z]
class Enum17[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, Z]
class Enum18[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, Z]
class Enum19[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, Z]
class Enum2[A1, A2, Z]
class Enum20[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, Z]
class Enum21[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, Z]
class Enum22[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, Z]
class Enum3[A1, A2, A3, Z]
class Enum4[A1, A2, A3, A4, Z]
class Enum5[A1, A2, A3, A4, A5, Z]
class Enum6[A1, A2, A3, A4, A5, A6, Z]
class Enum7[A1, A2, A3, A4, A5, A6, A7, Z]
class Enum8[A1, A2, A3, A4, A5, A6, A7, A8, Z]
class Enum9[A1, A2, A3, A4, A5, A6, A7, A8, A9, Z]
class EnumN[Z, C]

Members list

Concise view

Type members

Inherited types

type Accessors[Lens[_, _, _], Prism[_, _, _], Traversal[_, _]]

Attributes

Inherited from:
Schema

Value members

Abstract methods

def cases: Chunk[Case[Z, _]]
def id: TypeId

Concrete methods

def caseOf(id: String): Option[Case[Z, _]]
def caseOf(z: Z): Option[Case[Z, _]]
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
Any

Inherited methods

def <*>[B](that: Schema[B]): Schema[(A, B)]

A symbolic operator for zip.

A symbolic operator for zip.

Attributes

Inherited from:
Schema
def <+>[B](that: Schema[B]): Schema[Either[A, B]]

A symbolic operator for orElseEither.

A symbolic operator for orElseEither.

Attributes

Inherited from:
Schema
def ?: Schema[Option[A]]

A symbolic operator for optional.

A symbolic operator for optional.

Attributes

Inherited from:
Schema
def annotate(annotation: Any): Schema[A]

Returns a new schema that with annotation

Returns a new schema that with annotation

Attributes

Inherited from:
Schema
def annotations: Chunk[Any]

Chunk of annotations for this schema

Chunk of annotations for this schema

Attributes

Inherited from:
Schema

Attributes

Inherited from:
Schema
def coerce[B](newSchema: Schema[B]): Either[String, Schema[B]]

Convert to Schema[B] iff B and A are homomorphic.

Convert to Schema[B] iff B and A are homomorphic.

This can be used to e.g convert between a case class and it's "generic" representation as a ListMap[String,_]

Attributes

Inherited from:
Schema

The default value for a Schema of type A.

The default value for a Schema of type A.

Attributes

Inherited from:
Schema
def diff(thisValue: Z, thatValue: Z): Patch[A]

Performs a diff between thisValue and thatValue. See zio.schema.Differ for details on the default diff algorithms.

Performs a diff between thisValue and thatValue. See zio.schema.Differ for details on the default diff algorithms.

Attributes

Inherited from:
Schema

Attributes

Inherited from:
Schema

Attributes

Inherited from:
Schema
def migrate[B](newSchema: Schema[B]): Either[String, A => Either[String, B]]

Generate a homomorphism from A to B iff A and B are homomorphic

Generate a homomorphism from A to B iff A and B are homomorphic

Attributes

Inherited from:
Schema

Returns a new schema that modifies the type produced by this schema to be optional.

Returns a new schema that modifies the type produced by this schema to be optional.

Attributes

Inherited from:
Schema
def orElseEither[B](that: Schema[B]): Schema[Either[A, B]]

Returns a new schema that combines this schema and the specified schema together, modeling their either composition.

Returns a new schema that combines this schema and the specified schema together, modeling their either composition.

Attributes

Inherited from:
Schema

Attributes

Inherited from:
Schema
def patch(oldValue: Z, diff: Patch[Z]): Either[String, A]

Patch value with a Patch.

Patch value with a Patch.

Attributes

Inherited from:
Schema

Attributes

Inherited from:
Schema

Attributes

Inherited from:
Schema
def toDynamic(value: Z): DynamicValue

Attributes

Inherited from:
Schema
def transform[B](f: Z => B, g: B => Z)(implicit loc: SourceLocation): Schema[B]

Transforms this Schema[A] into a Schema[B], by supplying two functions that can transform between A and B, without possibility of failure.

Transforms this Schema[A] into a Schema[B], by supplying two functions that can transform between A and B, without possibility of failure.

Attributes

Inherited from:
Schema
def transformOrFail[B](f: Z => Either[String, B], g: B => Either[String, Z])(implicit loc: SourceLocation): Schema[B]

Transforms this Schema[A] into a Schema[B], by supplying two functions that can transform between A and B (possibly failing in some cases).

Transforms this Schema[A] into a Schema[B], by supplying two functions that can transform between A and B (possibly failing in some cases).

Attributes

Inherited from:
Schema
def validate(value: Z)(implicit schema: Schema[Z]): Chunk[ValidationError]

Attributes

Inherited from:
Schema
def zip[B](that: Schema[B]): Schema[(A, B)]

Returns a new schema that combines this schema and the specified schema together, modeling their tuple composition.

Returns a new schema that combines this schema and the specified schema together, modeling their tuple composition.

Attributes

Inherited from:
Schema