All Downloads are FREE. Search and download functionalities are using the official Maven repository.

enumeratum.values.Quill.scala Maven / Gradle / Ivy

The newest version!
package enumeratum.values

import io.getquill.MappedEncoding

object Quill {

  /** Returns an Encoder for the provided ValueEnum
    */
  def encoder[ValueType, EntryType <: ValueEnumEntry[ValueType]](
      @deprecatedName(Symbol("enum")) e: ValueEnum[ValueType, EntryType]
  ): MappedEncoding[EntryType, ValueType] = MappedEncoding(_.value)

  /** Returns a Decoder for the provided ValueEnum
    */
  def decoder[ValueType, EntryType <: ValueEnumEntry[ValueType]](
      @deprecatedName(Symbol("enum")) e: ValueEnum[ValueType, EntryType]
  ): MappedEncoding[ValueType, EntryType] = MappedEncoding(e.withValue)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy