Object/Class

polynote.config

ValidatedConfigDecoder

Related Docs: class ValidatedConfigDecoder | package config

Permalink

object ValidatedConfigDecoder extends Serializable

Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ValidatedConfigDecoder
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. implicit def deriveConfigDecoder[A, R <: HList, F <: HList, V <: HList, OV <: HList, OR <: HList, D <: HList, ZD <: HList, K <: HList](implicit gen: Aux[A, R], fields: Aux[R, F], values: Aux[R, V], optionized: Aux[V, Option, OV], optionizedRecord: Aux[F, OV, OR], decodeR: Lazy[ReprDecoder[OR]], defaults: Aux[A, D], fieldsToList: Aux[F, List, Symbol], keys: Aux[JsonKey, A, K], keysToList: Aux[K, List, Option[JsonKey]], zipWithDefaults: Aux[::[OR, ::[D, HNil]], ZD], mapper: Aux[ZD, ValidatedNel[DecodingFailure, HNil], optionalOrDefault.type, ValidatedNel[DecodingFailure, V]], relabel: Aux[F, V, R]): ValidatedConfigDecoder[A]

    Permalink

    This complex machine is for allowing us to keep our default values for the config ADT, but still validate the configs properly during decoding.

    This complex machine is for allowing us to keep our default values for the config ADT, but still validate the configs properly during decoding. Circe (at least the version available to us given Scala 2.11 constraint) silently drops decoding errors when there's a default value, and just uses the default instead. This derivation does something different: - Derive the shapeless record type OR that corresponds to the case class A, but with all values wrapped in Option. - Derive the circe decoder for OR, which allows values to be unspecified but does not drop validation errors. - Put the optionalized record together with the defaults from the case class constructor, and do another round of validation where a None is replaced by the default (if it exists) or a validation error (if there is no default). - Within the validated structure, go back to the original record type R that corresponds to the case class and use the shapeless LabelledGeneric to translate it to a validated case class instance.

  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  11. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  12. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  14. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  15. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  16. object optionalOrDefault extends Poly2

    Permalink
  17. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  18. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  19. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped