ProtoCodec

nscn.polaris2.grpc.codecs.ProtoCodec
object ProtoCodec

scodec codecs for messages generated by mill-protoc.

Was ScalaPb up to 0.0.2, when the messages came from ScalaPB. The shape is unchanged - a Codec[A] built from a message companion - because what a gRPC frame carries is a bare serialized message either way.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
ProtoCodec.type

Members list

Value members

Concrete methods

def codecForGenerated[A <: GeneratedMessage](companion: GeneratedMessageCompanion[A]): Codec[A]

Givens

Givens

given byteVectorTypeMapper: TypeMapper[ByteString, ByteVector]

Lets a bytes field be declared as a ByteVector.

Lets a bytes field be declared as a ByteVector.

Put it in scope and annotate the field with [(nscn.polaris2.protoc.field).type = "scodec.bits.ByteVector"]; the generator emits summon[TypeMapper[ByteString, ByteVector]], which resolves to this.

Attributes