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

endless.transaction.StringCodec.scala Maven / Gradle / Ivy

There is a newer version: 0.4.0
Show newest version
package endless.transaction

import endless.core.protocol.EntityIDCodec

/** Type class for encoding and decoding entity IDs to and from strings */
trait StringCodec[A] extends EntityIDCodec[A] {
  def encode(id: A): String
  def decode(id: String): A
}

object StringCodec {
  def apply[A](implicit codec: StringCodec[A]): StringCodec[A] = codec
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy