Lazy

final case class Lazy[A](schema0: () => Schema[A]) extends Schema[A]
trait Serializable
trait Product
trait Equals
trait Schema[A]
class Object
trait Matchable
class Any

Type members

Types

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

Value members

Concrete methods

override def annotate(annotation: Any): Lazy[A]
Definition Classes
override def annotations: Chunk[Any]
Definition Classes
def defaultValue: Either[String, A]
Definition Classes
override def toString: String
Definition Classes
Any

Inherited methods

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

A symbolic operator for zip.

A symbolic operator for zip.

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

A symbolic operator for orElseEither.

A symbolic operator for orElseEither.

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

A symbolic operator for optional.

A symbolic operator for optional.

Inherited from:
Schema
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,_]

Inherited from:
Schema
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.

Inherited from:
Schema
def fromDynamic(value: DynamicValue): Either[String, A]
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

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

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.

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.

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

Patch value with a Patch.

Patch value with a Patch.

Inherited from:
Schema
def productElementNames: Iterator[String]
Inherited from:
Product
def productIterator: Iterator[Any]
Inherited from:
Product
def repeated: Schema[Chunk[A]]
Inherited from:
Schema
Inherited from:
Schema
def toDynamic(value: A): DynamicValue
Inherited from:
Schema
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.

Inherited from:
Schema
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).

Inherited from:
Schema
def validate(value: A)(implicit schema: Schema[A]): Chunk[ValidationError]
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.

Inherited from:
Schema

Concrete fields

lazy val schema: Schema[A]