def deserializer = Serializer()

in codegen/src/main/scala/org/apache/pekko/grpc/gen/scaladsl/Method.scala [32:62]


  def deserializer = Serializer(methodDescriptor, inputType)
  def serializer = Serializer(methodDescriptor, outputType)

  def unmarshal =
    if (inputStreaming) "GrpcMarshalling.unmarshalStream"
    else "GrpcMarshalling.unmarshal"

  def marshal =
    if (outputStreaming) "GrpcMarshalling.marshalStream"
    else "GrpcMarshalling.marshal"

  def parameterType =
    if (inputStreaming) s"org.apache.pekko.stream.scaladsl.Source[${messageType(inputType)}, org.apache.pekko.NotUsed]"
    else messageType(inputType)

  def inputTypeUnboxed = messageType(inputType)
  def outputTypeUnboxed = messageType(outputType)

  def returnType =
    if (outputStreaming)
      s"org.apache.pekko.stream.scaladsl.Source[${messageType(outputType)}, org.apache.pekko.NotUsed]"
    else s"scala.concurrent.Future[${messageType(outputType)}]"

  val methodType: MethodType = {
    (inputStreaming, outputStreaming) match {
      case (false, false) => Unary
      case (true, false)  => ClientStreaming
      case (false, true)  => ServerStreaming
      case (true, true)   => BidiStreaming
    }
  }