NonEmptyMap

zio.schema.Schema.NonEmptyMap
final case class NonEmptyMap[K, V](keySchema: Schema[K], valueSchema: Schema[V], annotations: Chunk[Any] = ...) extends Collection[NonEmptyMap[K, V], (K, V)]

Attributes

Source
Schema.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Collection[NonEmptyMap[K, V], (K, V)]
trait Schema[NonEmptyMap[K, V]]
class Object
trait Matchable
class Any
Show all
Self type
NonEmptyMap[K, V]

Members list

Type members

Types

override type Accessors[Lens[_, _, _], Prism[_, _, _], Traversal[_, _]] = Traversal[NonEmptyMap[K, V], (K, V)]

Attributes

Source
Schema.scala

Value members

Concrete methods

override def annotate(annotation: Any): NonEmptyMap[K, V]

Returns a new schema that with annotation

Returns a new schema that with annotation

Attributes

Definition Classes
Source
Schema.scala
override def defaultValue: Either[String, NonEmptyMap[K, V]]

The default value for a Schema of type A.

The default value for a Schema of type A.

Attributes

Definition Classes
Source
Schema.scala
override def empty: NonEmptyMap[K, V]

Attributes

Definition Classes
Source
Schema.scala
override def fromChunk: Chunk[(K, V)] => NonEmptyMap[K, V]

Attributes

Definition Classes
Source
Schema.scala
def fromChunkOption(chunk: Chunk[(K, V)]): Option[NonEmptyMap[K, V]]

Attributes

Source
Schema.scala
def fromMap(map: Map[K, V]): NonEmptyMap[K, V]

Attributes

Source
Schema.scala
override def makeAccessors(b: AccessorBuilder): b.Traversal[NonEmptyMap[K, V], (K, V)]

Attributes

Definition Classes
Source
Schema.scala
override def toChunk: NonEmptyMap[K, V] => Chunk[(K, V)]

Attributes

Definition Classes
Source
Schema.scala

Inherited methods

def <*>[B](that: Schema[B]): Schema[(NonEmptyMap[K, V], B)]

A symbolic operator for zip.

A symbolic operator for zip.

Attributes

Inherited from:
Schema
Source
Schema.scala
def <+>[B](that: Schema[B]): Schema[Either[NonEmptyMap[K, V], B]]

A symbolic operator for orElseEither.

A symbolic operator for orElseEither.

Attributes

Inherited from:
Schema
Source
Schema.scala
def ?: Schema[Option[NonEmptyMap[K, V]]]

A symbolic operator for optional.

A symbolic operator for optional.

Attributes

Inherited from:
Schema
Source
Schema.scala

Attributes

Inherited from:
Schema
Source
Schema.scala
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
Source
Schema.scala
def default(value: NonEmptyMap[K, V]): Schema[NonEmptyMap[K, V]]

Add a default value to this schema.

Add a default value to this schema.

Attributes

Inherited from:
Schema
Source
Schema.scala
def diff(thisValue: NonEmptyMap[K, V], thatValue: NonEmptyMap[K, V]): Patch[NonEmptyMap[K, V]]

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
Source
Schema.scala
def fromDynamic(value: DynamicValue): Either[String, NonEmptyMap[K, V]]

Attributes

Inherited from:
Schema
Source
Schema.scala
def migrate[B](newSchema: Schema[B]): Either[String, NonEmptyMap[K, V] => 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
Source
Schema.scala
def optional: Schema[Option[NonEmptyMap[K, V]]]

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
Source
Schema.scala
def orElseEither[B](that: Schema[B]): Schema[Either[NonEmptyMap[K, V], 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
Source
Schema.scala
def ordering: Ordering[NonEmptyMap[K, V]]

Attributes

Inherited from:
Schema
Source
Schema.scala
def patch(oldValue: NonEmptyMap[K, V], diff: Patch[NonEmptyMap[K, V]]): Either[String, NonEmptyMap[K, V]]

Patch value with a Patch.

Patch value with a Patch.

Attributes

Inherited from:
Schema
Source
Schema.scala

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
Source
Product.scala

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product
Source
Product.scala
def repeated: Schema[Chunk[NonEmptyMap[K, V]]]

Attributes

Inherited from:
Schema
Source
Schema.scala
def serializable: Schema[Schema[NonEmptyMap[K, V]]]

Attributes

Inherited from:
Schema
Source
Schema.scala
def toDynamic(value: NonEmptyMap[K, V]): DynamicValue

Attributes

Inherited from:
Schema
Source
Schema.scala
def transform[B](f: NonEmptyMap[K, V] => B, g: B => NonEmptyMap[K, V])(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
Source
Schema.scala
def transformOrFail[B](f: NonEmptyMap[K, V] => Either[String, B], g: B => Either[String, NonEmptyMap[K, V]])(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
Source
Schema.scala
def validate(value: NonEmptyMap[K, V])(implicit schema: Schema[NonEmptyMap[K, V]]): Chunk[ValidationError]

Attributes

Inherited from:
Schema
Source
Schema.scala
def validation(validation: Validation[NonEmptyMap[K, V]]): Schema[NonEmptyMap[K, V]]

Attributes

Inherited from:
Schema
Source
Schema.scala
def zip[B](that: Schema[B]): Schema[(NonEmptyMap[K, V], 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
Source
Schema.scala