c

zio.schema.Schema

Transform

final case class Transform[A, B, I](codec: Schema[A], f: (A) ⇒ Either[String, B], g: (B) ⇒ Either[String, A], annotations: Chunk[Any], identity: I) extends Schema[B] with Product with Serializable

Linear Supertypes
Serializable, Serializable, Product, Equals, Schema[B], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Transform
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. Schema
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Transform(codec: Schema[A], f: (A) ⇒ Either[String, B], g: (B) ⇒ Either[String, A], annotations: Chunk[Any], identity: I)

Type Members

  1. type Accessors[Lens[_, _, _], Prism[_, _, _], Traversal[_, _]] = Schema.Accessors[Lens, Prism, Traversal]
    Definition Classes
    TransformSchema

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def <*>[B](that: Schema[B]): Schema[(B, B)]

    A symbolic operator for zip.

    A symbolic operator for zip.

    Definition Classes
    Schema
  4. def <+>[B](that: Schema[B]): Schema[Either[B, B]]

    A symbolic operator for orElseEither.

    A symbolic operator for orElseEither.

    Definition Classes
    Schema
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. def ?: Schema[Option[B]]

    A symbolic operator for optional.

    A symbolic operator for optional.

    Definition Classes
    Schema
  7. def annotate(annotation: Any): Transform[A, B, I]

    Returns a new schema that with annotation

    Returns a new schema that with annotation

    Definition Classes
    TransformSchema
  8. val annotations: Chunk[Any]

    Chunk of annotations for this schema

    Chunk of annotations for this schema

    Definition Classes
    TransformSchema
  9. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  10. def ast: SchemaAst
    Definition Classes
    Schema
  11. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  12. val codec: Schema[A]
  13. 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,_]

    Definition Classes
    Schema
  14. def defaultValue: Either[String, B]

    The default value for a Schema of type A.

    The default value for a Schema of type A.

    Definition Classes
    TransformSchema
  15. def diff(thisValue: B, thatValue: B, differ: Option[Differ[B]] = None): Diff[B]

    Performs a diff between thisValue and thatValue.

    Performs a diff between thisValue and thatValue. See zio.schema.Differ for details on the default diff algorithms.

    A custom zio.schema.Differ can be supplied if the default behavior is not acceptable.

    Definition Classes
    Schema
  16. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. val f: (A) ⇒ Either[String, B]
  18. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. def fromDynamic(value: DynamicValue): Either[String, B]
    Definition Classes
    Schema
  20. val g: (B) ⇒ Either[String, A]
  21. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  22. val identity: I
  23. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  24. def makeAccessors(b: AccessorBuilder): Schema.Accessors[Lens, Prism, Traversal]
    Definition Classes
    TransformSchema
  25. def migrate[B](newSchema: Schema[B]): Either[String, (B) ⇒ 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

    Definition Classes
    Schema
  26. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  27. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  28. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  29. def optional: Schema[Option[B]]

    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.

    Definition Classes
    Schema
  30. def orElseEither[B](that: Schema[B]): Schema[Either[B, 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.

    Definition Classes
    Schema
  31. def ordering: Ordering[B]
    Definition Classes
    Schema
  32. def patch(oldValue: B, diff: Diff[B]): Either[String, B]

    Patch value with a Diff.

    Patch value with a Diff.

    Definition Classes
    Schema
  33. def repeated: Schema[Chunk[B]]
    Definition Classes
    Schema
  34. def serializable: Schema[Schema[B]]
    Definition Classes
    TransformSchema
  35. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  36. def toDynamic(value: B): DynamicValue
    Definition Classes
    Schema
  37. def toSemiDynamic: Schema[(B, Schema[B])]
    Definition Classes
    Schema
  38. def toString(): String
    Definition Classes
    Transform → AnyRef → Any
  39. def transform[B](f: (B) ⇒ B, g: (B) ⇒ B)(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.

    Definition Classes
    Schema
  40. def transformOrFail[B](f: (B) ⇒ Either[String, B], g: (B) ⇒ Either[String, B])(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).

    Definition Classes
    Schema
  41. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  42. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  43. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  44. def zip[B](that: Schema[B]): Schema[(B, 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.

    Definition Classes
    Schema

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Schema[B]

Inherited from AnyRef

Inherited from Any

Ungrouped