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

endless.scodec.ScodecCommandProtocol.scala Maven / Gradle / Ivy

The newest version!
package endless.scodec

import endless.core.protocol.{CommandProtocol, IncomingCommand, OutgoingCommand}

trait ScodecCommandProtocol[Alg[_[_]]] extends CommandProtocol[Alg] {
  protected def outgoingCommand[C: scodec.Encoder, R: scodec.Decoder](
      command: C
  ): OutgoingCommand[R] = ScodecOutgoingCommand(command)

  protected def incomingCommand[F[_], R: scodec.Encoder](
      run: Alg[F] => F[R]
  ): IncomingCommand[F, Alg] = ScodecIncomingCommand(run)
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy