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

tethys.enumeratum.TethysKeyEnum.scala Maven / Gradle / Ivy

package tethys.enumeratum

import _root_.enumeratum.{Enum, EnumEntry}
import tethys.readers.KeyReader
import tethys.writers.KeyWriter

trait TethysKeyEnum[A <: EnumEntry] { _: Enum[A] =>
  implicit val tethysKeyReader: KeyReader[A] = Enumeratum.keyReader(this)(_.withNameOption)
  implicit val tethysKeyWriter: KeyWriter[A] = Enumeratum.keyWriter(_.entryName)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy