zio.schema
Members list
Type members
Classlikes
Attributes
- Graph
- Supertypes
- Self type
- DeriveSchema.type
Deriver builds type class instances based on a Schema.
Deriver builds type class instances based on a Schema.
The minimum set of methods to implement are:
deriveRecord
deriveEnum
derivePrimitive
deriveOption
deriveSequence
deriveMap
deriveTransformedRecord
(for records with more than 22 fields)
In addition to this more methods can be overridden to handle all the supported Schema types of zio-schema:
deriveEither
(callsderiveEnum
by default)deriveSet
(callsderiveSequence
by default)deriveTupleN
(callsderiveRecord
by default)
The cached
method converts this deriver to one that uses a cache of instances shared between macro invocations.
Each derive methods get an optional summoned implicit value of the derived type class. It is the deriver's decision whether to use the available instance (as a user defined customization for a given type) or not.
If the decision is to always accept a summoned value if there is any, use the Deriver.AutoAcceptSummoned
trait
which implements this automatically and only calls the trait's methods in case there is no available implicit for
the actual type.
Attributes
Attributes
- Graph
- Supertypes