OpticCheck

zio.blocks.schema.OpticCheck
See theOpticCheck companion class
object OpticCheck

The problems that an OpticCheck can hold.

Attributes

Companion
class
Source
OpticCheck.scala
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
OpticCheck.type

Members list

Type members

Classlikes

case class DynamicConversionError(error: String) extends Error

SchemaExpr#eval could not decode a result with the expected schema, or failed for another reason that has no case of its own. full and prefix are both the root path.

SchemaExpr#eval could not decode a result with the expected schema, or failed for another reason that has no case of its own. full and prefix are both the root path.

Attributes

Source
OpticCheck.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Error
trait Single
class Object
trait Matchable
class Any
Show all
case class EmptyMap(full: DynamicOptic, prefix: DynamicOptic) extends Warning

A step over every key or value found an empty map.

A step over every key or value found an empty map.

Attributes

Source
OpticCheck.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Warning
trait Single
class Object
trait Matchable
class Any
Show all
case class EmptySequence(full: DynamicOptic, prefix: DynamicOptic) extends Warning

A step over every element found an empty sequence. Traversals built with searchFor also report it when they find nothing.

A step over every element found an empty sequence. Traversals built with searchFor also report it when they find nothing.

Attributes

Source
OpticCheck.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Warning
trait Single
class Object
trait Matchable
class Any
Show all
sealed trait Error extends Single

A problem that stops the optic: another case of a variant, a wrapper that throws, or a failed conversion.

A problem that stops the optic: another case of a variant, a wrapper that throws, or a failed conversion.

Attributes

Source
OpticCheck.scala
Supertypes
trait Single
class Object
trait Matchable
class Any
Known subtypes
case class MissingKey(full: DynamicOptic, prefix: DynamicOptic, key: Any) extends Warning

A key step found a map without key. In a check from SchemaExpr#eval, key is a String rendering of the key.

A key step found a map without key. In a check from SchemaExpr#eval, key is a String rendering of the key.

Attributes

Source
OpticCheck.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Warning
trait Single
class Object
trait Matchable
class Any
Show all
case class SequenceIndexOutOfBounds(full: DynamicOptic, prefix: DynamicOptic, index: Int, size: Int) extends Warning

An index step needed the element at index, but the sequence has only size elements.

An index step needed the element at index, but the sequence has only size elements.

Attributes

Source
OpticCheck.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Warning
trait Single
class Object
trait Matchable
class Any
Show all
sealed trait Single

One problem found while following an optic: an OpticCheck.Error or an OpticCheck.Warning.

One problem found while following an optic: an OpticCheck.Error or an OpticCheck.Warning.

Attributes

Source
OpticCheck.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
case class UnexpectedCase(expectedCase: String, actualCase: String, full: DynamicOptic, prefix: DynamicOptic, actualValue: Any) extends Error

A prism step found another case of the variant. expectedCase and actualCase are case names. actualValue is the value at that step; in a check from SchemaExpr#eval, it is the whole input.

A prism step found another case of the variant. expectedCase and actualCase are case names. actualValue is the value at that step; in a check from SchemaExpr#eval, it is the whole input.

Attributes

Source
OpticCheck.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Error
trait Single
class Object
trait Matchable
class Any
Show all
sealed trait Warning extends Single

A problem caused by a missing part: an empty collection, an index past the end, or a missing key.

A problem caused by a missing part: an empty collection, an index past the end, or a missing key.

Attributes

Source
OpticCheck.scala
Supertypes
trait Single
class Object
trait Matchable
class Any
Known subtypes
case class WrappingError(full: DynamicOptic, prefix: DynamicOptic, error: SchemaError) extends Error

A wrapper step's wrap or unwrap threw error. A searchFor traversal also reports it when the modified value no longer decodes with the source schema.

A wrapper step's wrap or unwrap threw error. A searchFor traversal also reports it when the modified value no longer decodes with the source schema.

Attributes

Source
OpticCheck.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Error
trait Single
class Object
trait Matchable
class Any
Show all

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements.

The names of the product elements.

Attributes

Inherited from:
Mirror
Source
Mirror.scala
type MirroredLabel <: String

The name of the type.

The name of the type.

Attributes

Inherited from:
Mirror
Source
Mirror.scala