izumi.idealingua.runtime.rpc.IRTWrappedService.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of idealingua-v1-runtime-rpc-scala_3 Show documentation
Show all versions of idealingua-v1-runtime-rpc-scala_3 Show documentation
idealingua-v1-runtime-rpc-scala
package izumi.idealingua.runtime.rpc
trait IRTWrappedService[F[_, _], -C] { self =>
def serviceId: IRTServiceId
def allMethods: Map[IRTMethodId, IRTMethodWrapper[F, C]]
final def contramap[D](f: D => C): IRTWrappedService[F, D] = {
new IRTWrappedService[F, D] {
override final val serviceId: IRTServiceId = self.serviceId
override final val allMethods: Map[IRTMethodId, IRTMethodWrapper[F, D]] = {
self.allMethods.map { case (k, v) => k -> v.contramap(f) }
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy