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

izumi.idealingua.runtime.rpc.http4s.context.WsIdExtractor.scala Maven / Gradle / Ivy

The newest version!
package izumi.idealingua.runtime.rpc.http4s.context

trait WsIdExtractor[RequestCtx, WsCtx] {
  def extract(ctx: RequestCtx, previous: Option[WsCtx]): Option[WsCtx]
}

object WsIdExtractor {
  def id[C]: WsIdExtractor[C, C]              = (c, _) => Some(c)
  def widen[C, C0 >: C]: WsIdExtractor[C, C0] = (c, _) => Some(c)
  def unit[C]: WsIdExtractor[C, Unit]         = (_, _) => Some(())
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy