object Schema
Data types and smart constructors which simplify the creation of schema values.
- Alphabetic
- By Inheritance
- Schema
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- final class AbsentBuilder[P[_]] extends AnyRef
Builder class used to construct a Absent property
- final class ConstantBuilder[P[_]] extends AnyRef
Builder class used to construct a Constant property
- 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.
- 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.
- 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.
- implicit class SchemaOps[P[_], I] extends AnyRef
- 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
. - 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
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- 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.
- 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.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- 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.
- 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.
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- 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.
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- 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 theLeft
constructor and one forRight
.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.
- def oneOfDiscr[P[_], I](discriminatorField: String): ToOneOfWithDiscriminator[P, I]
- 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
- 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
- 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
- implicit def propApplicative[P[_], O]: Applicative[[γ$4$]FreeApplicative[[γ$3$]PropSchema[O, [β$2$]HFix[[β$0$[_$1], γ$1$]SchemaF[P, β$0$, γ$1$], β$2$], γ$3$], γ$4$]]
- implicit def propProfunctor[P[_]]: Profunctor[[β$7$, γ$8$]FreeApplicative[[γ$3$]PropSchema[β$7$, [β$2$]HFix[[β$0$[_$1], γ$1$]SchemaF[P, β$0$, γ$1$], β$2$], γ$3$], γ$8$]]
- 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
- 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.
- 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
- 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
- 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]
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- 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 theLeft
constructor and one forRight
.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.
- def unsafeOneOfDiscr[P[_], I](discriminatorField: String)(alts: NonEmptyList[Alt[[β$49$]HFix[[β$0$[_$1], γ$1$]SchemaF[P, β$0$, γ$1$], β$49$], I, _]]): Schema[P, I]
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated @Deprecated
- Deprecated