Sequence

zio.schema.Schema$.Sequence
final case class Sequence[Col, Elem, I](elementSchema: Schema[Elem], fromChunk: Chunk[Elem] => Col, toChunk: Col => Chunk[Elem], annotations: Chunk[Any], identity: I) extends Collection[Col, Elem]

Attributes

Graph
Supertypes
trait Product
trait Equals
trait Collection[Col, Elem]
trait Schema[Col]
class Object
trait Matchable
class Any
Self type
Sequence[Col, Elem, I]

Members list

Concise view

Type members

Types

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

Value members

Concrete methods

override def annotate(annotation: Any): Sequence[Col, Elem, I]

Returns a new schema that with annotation

Returns a new schema that with annotation

Attributes

Definition Classes
override def defaultValue: Either[String, Col]

The default value for a Schema of type A.

The default value for a Schema of type A.

Attributes

Definition Classes
override def makeAccessors(b: AccessorBuilder): Traversal[Col, Elem]

Attributes

Definition Classes
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

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
def diff(thisValue: Col, thatValue: Col): 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
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: Col, diff: Patch[Col]): Either[String, A]

Patch value with a Patch.

Patch value with a Patch.

Attributes

Inherited from:
Schema

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product

Attributes

Inherited from:
Schema

Attributes

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

Attributes

Inherited from:
Schema
def transform[B](f: Col => B, g: B => Col)(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: Col => Either[String, B], g: B => Either[String, Col])(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: Col)(implicit schema: Schema[Col]): 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