Schema

zio.schema.Schema
See theSchema companion object
sealed trait Schema[A]

A Schema[A] describes the structure of some data type A, in terms of case classes, enumerations (sealed traits), collections, and various primitive types (including not only Scala's own primitive types, but enhanced with java.time and big integers / decimals).

Schemas models the structure of data types as first class values, so they can be introspected, transformed, and combined using ordinary Scala code, without macros, metaprogramming, or codegen.

There are implicit schemas provided for all standard Scala types, and you can automatically derive schemas for your own data types by using DeriveSchema.gen[A]. Whether you write them by hand by using constructors and operators,

final case class Person(name: String, age: Int)
object Person {
 implicit val personSchema: Schema[Person] = DeriveSchema.gen[Person]
}

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Collection[Col, Elem]
class Map[K, V]
class Sequence[Col, Elem, I]
class Set[A]
class Dynamic
class Either[A, B]
trait Enum[Z]
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]
class Fail[A]
class Lazy[A]
class Optional[A]
class Primitive[A]
trait Record[R]
trait CaseClass0[Z]
trait CaseClass1[A, Z]
trait CaseClass10[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Z]
trait CaseClass11[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Z]
trait CaseClass12[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Z]
trait CaseClass13[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Z]
trait CaseClass14[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Z]
trait CaseClass15[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Z]
trait CaseClass16[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, Z]
trait CaseClass17[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, Z]
trait CaseClass18[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, Z]
trait CaseClass19[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, Z]
trait CaseClass2[A1, A2, Z]
trait CaseClass20[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, Z]
trait CaseClass21[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, Z]
trait CaseClass22[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, Z]
trait CaseClass3[A1, A2, A3, Z]
trait CaseClass4[A1, A2, A3, A4, Z]
trait CaseClass5[A1, A2, A3, A4, A5, Z]
trait CaseClass6[A1, A2, A3, A4, A5, A6, Z]
trait CaseClass7[A1, A2, A3, A4, A5, A6, A7, Z]
trait CaseClass8[A1, A2, A3, A4, A5, A6, A7, A8, Z]
trait CaseClass9[A1, A2, A3, A4, A5, A6, A7, A8, A9, Z]
class Transform[A, B, I]
class Tuple2[A, B]
Self type

Members list

Concise view

Type members

Types

type Accessors[Lens[_, _, _], Prism[_, _, _], Traversal[_, _]]
Implicitly added by chunk
type Accessors[Lens[_, _, _], Prism[_, _, _], Traversal[_, _]]
Implicitly added by list
type Accessors[Lens[_, _, _], Prism[_, _, _], Traversal[_, _]]
Implicitly added by option
type Accessors[Lens[_, _, _], Prism[_, _, _], Traversal[_, _]]
Implicitly added by set
type Accessors[Lens[_, _, _], Prism[_, _, _], Traversal[_, _]]
Implicitly added by vector
type Accessors[Lens[_, _, _], Prism[_, _, _], Traversal[_, _]]

Value members

Abstract methods

def annotate(annotation: Any): Schema[A]
Implicitly added by chunk

Returns a new schema that with annotation

Returns a new schema that with annotation

Attributes

def annotate(annotation: Any): Schema[A]
Implicitly added by list

Returns a new schema that with annotation

Returns a new schema that with annotation

Attributes

def annotate(annotation: Any): Schema[A]
Implicitly added by option

Returns a new schema that with annotation

Returns a new schema that with annotation

Attributes

def annotate(annotation: Any): Schema[A]
Implicitly added by set

Returns a new schema that with annotation

Returns a new schema that with annotation

Attributes

def annotate(annotation: Any): Schema[A]
Implicitly added by vector

Returns a new schema that with annotation

Returns a new schema that with annotation

Attributes

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

Returns a new schema that with annotation

Returns a new schema that with annotation

Attributes

def annotations: Chunk[Any]
Implicitly added by chunk

Chunk of annotations for this schema

Chunk of annotations for this schema

Attributes

def annotations: Chunk[Any]
Implicitly added by list

Chunk of annotations for this schema

Chunk of annotations for this schema

Attributes

def annotations: Chunk[Any]
Implicitly added by option

Chunk of annotations for this schema

Chunk of annotations for this schema

Attributes

def annotations: Chunk[Any]
Implicitly added by set

Chunk of annotations for this schema

Chunk of annotations for this schema

Attributes

def annotations: Chunk[Any]
Implicitly added by vector

Chunk of annotations for this schema

Chunk of annotations for this schema

Attributes

def annotations: Chunk[Any]

Chunk of annotations for this schema

Chunk of annotations for this schema

Attributes

Implicitly added by chunk

The default value for a Schema of type A.

The default value for a Schema of type A.

Attributes

Implicitly added by list

The default value for a Schema of type A.

The default value for a Schema of type A.

Attributes

Implicitly added by option

The default value for a Schema of type A.

The default value for a Schema of type A.

Attributes

Implicitly added by set

The default value for a Schema of type A.

The default value for a Schema of type A.

Attributes

Implicitly added by vector

The default value for a Schema of type A.

The default value for a Schema of type A.

Attributes

The default value for a Schema of type A.

The default value for a Schema of type A.

Attributes

Concrete methods

def <*>[B](that: Schema[B]): Schema[(A, B)]
Implicitly added by chunk

A symbolic operator for zip.

A symbolic operator for zip.

Attributes

def <*>[B](that: Schema[B]): Schema[(A, B)]
Implicitly added by list

A symbolic operator for zip.

A symbolic operator for zip.

Attributes

def <*>[B](that: Schema[B]): Schema[(A, B)]
Implicitly added by option

A symbolic operator for zip.

A symbolic operator for zip.

Attributes

def <*>[B](that: Schema[B]): Schema[(A, B)]
Implicitly added by set

A symbolic operator for zip.

A symbolic operator for zip.

Attributes

def <*>[B](that: Schema[B]): Schema[(A, B)]
Implicitly added by vector

A symbolic operator for zip.

A symbolic operator for zip.

Attributes

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

A symbolic operator for zip.

A symbolic operator for zip.

Attributes

def <+>[B](that: Schema[B]): Schema[Either[A, B]]
Implicitly added by chunk

A symbolic operator for orElseEither.

A symbolic operator for orElseEither.

Attributes

def <+>[B](that: Schema[B]): Schema[Either[A, B]]
Implicitly added by list

A symbolic operator for orElseEither.

A symbolic operator for orElseEither.

Attributes

def <+>[B](that: Schema[B]): Schema[Either[A, B]]
Implicitly added by option

A symbolic operator for orElseEither.

A symbolic operator for orElseEither.

Attributes

def <+>[B](that: Schema[B]): Schema[Either[A, B]]
Implicitly added by set

A symbolic operator for orElseEither.

A symbolic operator for orElseEither.

Attributes

def <+>[B](that: Schema[B]): Schema[Either[A, B]]
Implicitly added by vector

A symbolic operator for orElseEither.

A symbolic operator for orElseEither.

Attributes

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

A symbolic operator for orElseEither.

A symbolic operator for orElseEither.

Attributes

def ?: Schema[Option[A]]
Implicitly added by chunk

A symbolic operator for optional.

A symbolic operator for optional.

Attributes

def ?: Schema[Option[A]]
Implicitly added by list

A symbolic operator for optional.

A symbolic operator for optional.

Attributes

def ?: Schema[Option[A]]
Implicitly added by option

A symbolic operator for optional.

A symbolic operator for optional.

Attributes

def ?: Schema[Option[A]]
Implicitly added by set

A symbolic operator for optional.

A symbolic operator for optional.

Attributes

def ?: Schema[Option[A]]
Implicitly added by vector

A symbolic operator for optional.

A symbolic operator for optional.

Attributes

def ?: Schema[Option[A]]

A symbolic operator for optional.

A symbolic operator for optional.

Attributes

Implicitly added by chunk
Implicitly added by list
Implicitly added by option
Implicitly added by set
Implicitly added by vector
def coerce[B](newSchema: Schema[B]): Either[String, Schema[B]]
Implicitly added by chunk

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

def coerce[B](newSchema: Schema[B]): Either[String, Schema[B]]
Implicitly added by list

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

def coerce[B](newSchema: Schema[B]): Either[String, Schema[B]]
Implicitly added by option

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

def coerce[B](newSchema: Schema[B]): Either[String, Schema[B]]
Implicitly added by set

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

def coerce[B](newSchema: Schema[B]): Either[String, Schema[B]]
Implicitly added by vector

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

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

def diff(thisValue: A, thatValue: A): Patch[A]
Implicitly added by chunk

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

def diff(thisValue: A, thatValue: A): Patch[A]
Implicitly added by list

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

def diff(thisValue: A, thatValue: A): Patch[A]
Implicitly added by option

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

def diff(thisValue: A, thatValue: A): Patch[A]
Implicitly added by set

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

def diff(thisValue: A, thatValue: A): Patch[A]
Implicitly added by vector

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

def diff(thisValue: A, thatValue: A): 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

Implicitly added by chunk
Implicitly added by list
Implicitly added by option
Implicitly added by set
Implicitly added by vector
def migrate[B](newSchema: Schema[B]): Either[String, A => Either[String, B]]
Implicitly added by chunk

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

def migrate[B](newSchema: Schema[B]): Either[String, A => Either[String, B]]
Implicitly added by list

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

def migrate[B](newSchema: Schema[B]): Either[String, A => Either[String, B]]
Implicitly added by option

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

def migrate[B](newSchema: Schema[B]): Either[String, A => Either[String, B]]
Implicitly added by set

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

def migrate[B](newSchema: Schema[B]): Either[String, A => Either[String, B]]
Implicitly added by vector

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

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

Implicitly added by chunk

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

Implicitly added by list

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

Implicitly added by option

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

Implicitly added by set

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

Implicitly added by vector

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

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

def orElseEither[B](that: Schema[B]): Schema[Either[A, B]]
Implicitly added by chunk

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

def orElseEither[B](that: Schema[B]): Schema[Either[A, B]]
Implicitly added by list

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

def orElseEither[B](that: Schema[B]): Schema[Either[A, B]]
Implicitly added by option

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

def orElseEither[B](that: Schema[B]): Schema[Either[A, B]]
Implicitly added by set

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

def orElseEither[B](that: Schema[B]): Schema[Either[A, B]]
Implicitly added by vector

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

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

Implicitly added by chunk
Implicitly added by list
Implicitly added by option
Implicitly added by set
Implicitly added by vector
def patch(oldValue: A, diff: Patch[A]): Either[String, A]
Implicitly added by chunk

Patch value with a Patch.

Patch value with a Patch.

Attributes

def patch(oldValue: A, diff: Patch[A]): Either[String, A]
Implicitly added by list

Patch value with a Patch.

Patch value with a Patch.

Attributes

def patch(oldValue: A, diff: Patch[A]): Either[String, A]
Implicitly added by option

Patch value with a Patch.

Patch value with a Patch.

Attributes

def patch(oldValue: A, diff: Patch[A]): Either[String, A]
Implicitly added by set

Patch value with a Patch.

Patch value with a Patch.

Attributes

def patch(oldValue: A, diff: Patch[A]): Either[String, A]
Implicitly added by vector

Patch value with a Patch.

Patch value with a Patch.

Attributes

def patch(oldValue: A, diff: Patch[A]): Either[String, A]

Patch value with a Patch.

Patch value with a Patch.

Attributes

Implicitly added by chunk
Implicitly added by list
Implicitly added by option
Implicitly added by set
Implicitly added by vector
Implicitly added by chunk
Implicitly added by list
Implicitly added by option
Implicitly added by set
Implicitly added by vector
def toDynamic(value: A): DynamicValue
Implicitly added by chunk
def toDynamic(value: A): DynamicValue
Implicitly added by list
def toDynamic(value: A): DynamicValue
Implicitly added by option
def toDynamic(value: A): DynamicValue
Implicitly added by set
def toDynamic(value: A): DynamicValue
Implicitly added by vector
def toDynamic(value: A): DynamicValue
def transform[B](f: A => B, g: B => A)(implicit loc: SourceLocation): Schema[B]
Implicitly added by chunk

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

def transform[B](f: A => B, g: B => A)(implicit loc: SourceLocation): Schema[B]
Implicitly added by list

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

def transform[B](f: A => B, g: B => A)(implicit loc: SourceLocation): Schema[B]
Implicitly added by option

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

def transform[B](f: A => B, g: B => A)(implicit loc: SourceLocation): Schema[B]
Implicitly added by set

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

def transform[B](f: A => B, g: B => A)(implicit loc: SourceLocation): Schema[B]
Implicitly added by vector

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

def transform[B](f: A => B, g: B => A)(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

def transformOrFail[B](f: A => Either[String, B], g: B => Either[String, A])(implicit loc: SourceLocation): Schema[B]
Implicitly added by chunk

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

def transformOrFail[B](f: A => Either[String, B], g: B => Either[String, A])(implicit loc: SourceLocation): Schema[B]
Implicitly added by list

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

def transformOrFail[B](f: A => Either[String, B], g: B => Either[String, A])(implicit loc: SourceLocation): Schema[B]
Implicitly added by option

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

def transformOrFail[B](f: A => Either[String, B], g: B => Either[String, A])(implicit loc: SourceLocation): Schema[B]
Implicitly added by set

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

def transformOrFail[B](f: A => Either[String, B], g: B => Either[String, A])(implicit loc: SourceLocation): Schema[B]
Implicitly added by vector

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

def transformOrFail[B](f: A => Either[String, B], g: B => Either[String, A])(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

def validate(value: A)(implicit schema: Schema[A]): Chunk[ValidationError]
Implicitly added by chunk
def validate(value: A)(implicit schema: Schema[A]): Chunk[ValidationError]
Implicitly added by list
def validate(value: A)(implicit schema: Schema[A]): Chunk[ValidationError]
Implicitly added by option
def validate(value: A)(implicit schema: Schema[A]): Chunk[ValidationError]
Implicitly added by set
def validate(value: A)(implicit schema: Schema[A]): Chunk[ValidationError]
Implicitly added by vector
def validate(value: A)(implicit schema: Schema[A]): Chunk[ValidationError]
def zip[B](that: Schema[B]): Schema[(A, B)]
Implicitly added by chunk

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

def zip[B](that: Schema[B]): Schema[(A, B)]
Implicitly added by list

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

def zip[B](that: Schema[B]): Schema[(A, B)]
Implicitly added by option

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

def zip[B](that: Schema[B]): Schema[(A, B)]
Implicitly added by set

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

def zip[B](that: Schema[B]): Schema[(A, B)]
Implicitly added by vector

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

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