object Schema

Data types and smart constructors which simplify the creation of schema values.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Schema
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. final class AbsentBuilder[P[_]] extends AnyRef

    Builder class used to construct a Absent property

  2. final class ConstantBuilder[P[_]] extends AnyRef

    Builder class used to construct a Constant property

  3. type Prop[P[_], O, I] = FreeApplicative[[γ$3$]PropSchema[O, [β$2$]HFix[[β$0$[_$1], γ$1$]SchemaF[P, β$0$, γ$1$], β$2$], γ$3$], I]

    The type of free applicative values which are used to capture the structure of individual record properties.

  4. type Props[P[_], R] = FreeApplicative[[γ$3$]PropSchema[R, [β$2$]HFix[[β$0$[_$1], γ$1$]SchemaF[P, β$0$, γ$1$], β$2$], γ$3$], R]

    The type of free applicative values which are used to capture the structure of record (product) types.

  5. type Schema[P[_], I] = HFix[[β$0$[_$1], γ$1$]SchemaF[P, β$0$, γ$1$], I]

    The type of an unannotated schema.

    The type of an unannotated schema.

    This is an alias for the HFix fixpoint applied to the SchemaF type constructor.

  6. implicit class SchemaOps[P[_], I] extends AnyRef
  7. final class ToOneOf[P[_], I] extends AnyRef

    Builder class used to construct a OneOfSchema value from an HList of alternatives which are proven to provide handling for every constructor of the sum type I.

  8. final class ToOneOfWithDiscriminator[P[_], I] extends AnyRef

    Builder class used to construct a OneOfSchema value with discriminator field from an HList of alternatives which are proven to provide handling for every constructor of the sum type I.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def absent[P[_]]: AbsentBuilder[P]

    Smart constructor for absent Prop instances.

    Smart constructor for absent Prop instances.

    P

    The GADT type constructor for a sum type which defines the set of primitive types used in the schema.

  5. def alt[P[_], I, J](id: String, base: Schema[P, J], subset: Subset[I, J]): Alt[[β$51$]HFix[[β$0$[_$1], γ$1$]SchemaF[P, β$0$, γ$1$], β$51$], I, J]

    Convenience constructor for oneOf schema alternatives.

    Convenience constructor for oneOf schema alternatives.

    P

    The GADT type constructor for a sum type which defines the set of primitive types used in the schema.

    I

    The type of the Scala value to be produced (or consumed) by an interpreter of the schema. Also known as the "index" type of the schema.

    J

    The type of the base value which can be mapped into the I algebra.

    id

    The unique identifier of the constructor

    base

    The schema for the J type

    subset

    Prism between the sum type and the selected constructor.

  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  8. def const[P[_], O](obj: O): Schema[P, O]

    The unannotated empty record schema, representing a constant value.

    The unannotated empty record schema, representing a constant value.

    P

    The GADT type constructor for a sum type which defines the set of primitive types used in the schema.

  9. def constant[P[_]]: ConstantBuilder[P]

    Smart constructor for constant Prop instances.

    Smart constructor for constant Prop instances.

    P

    The GADT type constructor for a sum type which defines the set of primitive types used in the schema.

  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  12. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  13. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  14. def hfmapAlg[P[_], Q[_]](nt: ~>[P, Q]): ~>[[γ$54$]SchemaF[P, [β$53$]HFix[[β$0$[_$1], γ$1$]SchemaF[Q, β$0$, γ$1$], β$53$], γ$54$], [β$55$]HFix[[β$0$[_$1], γ$1$]SchemaF[Q, β$0$, γ$1$], β$55$]]

    HAlgebra for primitive type constructor transformation.

  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  18. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  19. def oneOf[P[_], I]: ToOneOf[P, I]

    Builds an un-annotated schema for the sum type I from an HList of alternatives.

    Builds an un-annotated schema for the sum type I from an HList of alternatives.

    Each alternative value in the list describes a single constructor of I. For example, to construct the schema for scala.util.Either one would provide two alternatives, one for the Left constructor and one for Right.

    An easier-to-read type signature for this function is below:

    def oneOf[P[_], I](alts: NonEmptyList[Alt[Schema[P, *], I, _]]): Schema[P, I]
    P

    The GADT type constructor for a sum type which defines the set of primitive types used in the schema.

    I

    The type of the Scala value to be produced (or consumed) by an interpreter of the schema. Also known as the "index" type of the schema.

  20. def oneOfDiscr[P[_], I](discriminatorField: String): ToOneOfWithDiscriminator[P, I]
  21. def optional[P[_], O, I](fieldName: String, valueSchema: Schema[P, I], property: Property[O, I]): Prop[P, O, Option[I]]

    Smart constructor for optional Prop instances.

    Smart constructor for optional Prop instances.

    P

    The GADT type constructor for a sum type which defines the set of primitive types used in the schema.

    O

    The type of a Scala record - an object or a tuple, the property of which is being defined.

    I

    The type of the Scala value to be produced (or consumed) by an interpreter of the schema. Also known as the "index" type of the schema.

    fieldName

    name of the record property

    valueSchema

    schema for the record property's type

    property

    Property lens from the record type to the property's value

  22. def optional[P[_], O, I, OI <: Option[I]](fieldName: String, valueSchema: Schema[P, I], extract: Extract[O, OI]): Prop[P, O, Option[I]]

    Smart constructor for optional Prop instances.

    Smart constructor for optional Prop instances.

    P

    The GADT type constructor for a sum type which defines the set of primitive types used in the schema.

    O

    The type of a Scala record - an object or a tuple, the property of which is being defined.

    I

    The type of the Scala value to be produced (or consumed) by an interpreter of the schema. Also known as the "index" type of the schema.

    OI

    hack for proper overload resolution

    fieldName

    name of the record property

    valueSchema

    schema for the record property's type

    extract

    Extract lens from the record type to the property's value

  23. def prim[P[_], I](p: P[I]): Schema[P, I]

    Lifts a value in an algebra of primitives into an unannotated Schema

    Lifts a value in an algebra of primitives into an unannotated Schema

    P

    The GADT type constructor for a sum type which defines the set of primitive types used in the schema.

    I

    The type of the Scala value to be produced (or consumed) by an interpreter of the schema. Also known as the "index" type of the schema.

    p

    a value of the P algebra

    returns

    the newly constructed schema value

  24. implicit def propApplicative[P[_], O]: Applicative[[γ$4$]FreeApplicative[[γ$3$]PropSchema[O, [β$2$]HFix[[β$0$[_$1], γ$1$]SchemaF[P, β$0$, γ$1$], β$2$], γ$3$], γ$4$]]
  25. implicit def propProfunctor[P[_]]: Profunctor[[β$7$, γ$8$]FreeApplicative[[γ$3$]PropSchema[β$7$, [β$2$]HFix[[β$0$[_$1], γ$1$]SchemaF[P, β$0$, γ$1$], β$2$], γ$3$], γ$8$]]
  26. def property[P[_], O, I](fieldName: String, valueSchema: Schema[P, I], default: I, extract: Extract[O, I]): Prop[P, O, I]

    Smart constructor for required Prop instances, with a default provided for the case where a serialized form is missing the required field.

    Smart constructor for required Prop instances, with a default provided for the case where a serialized form is missing the required field.

    P

    The GADT type constructor for a sum type which defines the set of primitive types used in the schema.

    O

    The type of a Scala record - an object or a tuple, the property of which is being defined.

    I

    The type of the Scala value to be produced (or consumed) by an interpreter of the schema. Also known as the "index" type of the schema.

    fieldName

    Name of the record property

    valueSchema

    Schema for the record property's type

    default

    Default value for use in the case that a serialized form is missing the required field.

    extract

    Extract lens from the record type to the property's value

  27. def rec[P[_], I](props: Props[P, I]): Schema[P, I]

    Builds an un-annotated schema for a record type from the free applicative capture of that record's structure.

    Builds an un-annotated schema for a record type from the free applicative capture of that record's structure.

    P

    The GADT type constructor for a sum type which defines the set of primitive types used in the schema.

    I

    The type of the Scala value to be produced (or consumed) by an interpreter of the schema. Also known as the "index" type of the schema.

    props

    The free-applicative value that captures the structure of the record type.

  28. def required[P[_], O, I](fieldName: String, valueSchema: Schema[P, I], extract: Extract[O, I]): Prop[P, O, I]

    Smart constructor for required Prop instances.

    Smart constructor for required Prop instances.

    P

    The GADT type constructor for a sum type which defines the set of primitive types used in the schema.

    O

    The type of a Scala record - an object or a tuple, the property of which is being defined.

    I

    The type of the Scala value to be produced (or consumed) by an interpreter of the schema. Also known as the "index" type of the schema.

    fieldName

    name of the record property

    valueSchema

    schema for the record property's type

    extract

    Extract lens from the record type to the property's value

  29. def schema[P[_], I](sf: => SchemaF[P, [β$14$]HFix[[β$0$[_$1], γ$1$]SchemaF[P, β$0$, γ$1$], β$14$], I]): Schema[P, I]

    Lifts a SchemaF value into an unannotated Schema

    Lifts a SchemaF value into an unannotated Schema

    P

    The GADT type constructor for a sum type which defines the set of primitive types used in the schema.

    I

    The type of the Scala value to be produced (or consumed) by an interpreter of the schema. Also known as the "index" type of the schema.

    sf

    The value to be annotated

    returns

    the newly constructed schema value

  30. implicit def schemaHFunctor: HFunctor[Schema]

    Constructs the HFunctor instance for a Schema.

    Constructs the HFunctor instance for a Schema.

    An easier-to-read type signature for this function is below:

    implicit def schemaHFunctor: HFunctor[Schema]
  31. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  32. def toString(): String
    Definition Classes
    AnyRef → Any
  33. def unsafeOneOf[P[_], I](alts: NonEmptyList[Alt[[β$47$]HFix[[β$0$[_$1], γ$1$]SchemaF[P, β$0$, γ$1$], β$47$], I, _]]): Schema[P, I]

    Builds an un-annotated schema for the sum type I from a list of alternatives.

    Builds an un-annotated schema for the sum type I from a list of alternatives.

    Each alternative value in the list describes a single constructor of I. For example, to construct the schema for scala.util.Either one would provide two alternatives, one for the Left constructor and one for Right.

    This convenience constructor is unsafe in that the compiler will not prove that handling is present for every constructor of your sum type; however, it may sometimes be needed in the case that failures of the Scala compiler to correctly identify all the constructors of a sum type make it otherwise impossible to build a schema value.

    P

    The GADT type constructor for a sum type which defines the set of primitive types used in the schema.

    I

    The type of the Scala value to be produced (or consumed) by an interpreter of the schema. Also known as the "index" type of the schema.

  34. def unsafeOneOfDiscr[P[_], I](discriminatorField: String)(alts: NonEmptyList[Alt[[β$49$]HFix[[β$0$[_$1], γ$1$]SchemaF[P, β$0$, γ$1$], β$49$], I, _]]): Schema[P, I]
  35. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  36. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  37. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped