mu-protobuf-0.4.0.3: Protocol Buffers serialization and gRPC schema import for Mu microservices
Safe HaskellNone
LanguageHaskell2010

Mu.Adapter.ProtoBuf.Via

Description

In order to interoperate with the proto3-wire library, we sometimes need an instance of Proto3WireEncoder. By using the wrappers in this module, such instances can be obtained automatically if the type can be turned into a Schema.

Synopsis

Documentation

newtype ViaToProtoBufTypeRef (ref :: TypeRef snm) t Source #

Specifies that a type is turned into a Protocol Buffers message by using the schema as intermediate representation.

newtype ViaFromProtoBufTypeRef (ref :: TypeRef snm) t Source #

Specifies that a type can be parsed from a Protocol Buffers message by using the schema as intermediate representation.

class FromProtoBufTypeRef (ref :: TypeRef snm) t where Source #

Types which can be parsed from a Protocol Buffers message.

Instances

Instances details
(FromProtoBufRegistry r t, IsProtoSchema (MappingRight r last) sty, FromSchema (MappingRight r last) sty t) => FromProtoBufTypeRef ('RegistryRef r t last :: TypeRef snm) t Source # 
Instance details

Defined in Mu.Adapter.ProtoBuf.Via

Methods

fromProtoBufTypeRef :: Proxy ('RegistryRef r t last) -> Parser RawMessage t Source #

(IsProtoSchema sch sty, FromSchema sch sty t) => FromProtoBufTypeRef ('SchemaRef sch sty :: TypeRef snm) t Source # 
Instance details

Defined in Mu.Adapter.ProtoBuf.Via

Methods

fromProtoBufTypeRef :: Proxy ('SchemaRef sch sty) -> Parser RawMessage t Source #

class ToProtoBufTypeRef (ref :: TypeRef snm) t where Source #

Types which can be turned into a Protocol Buffers message.

Instances

Instances details
(FromProtoBufRegistry r t, IsProtoSchema (MappingRight r last) sty, ToSchema (MappingRight r last) sty t) => ToProtoBufTypeRef ('RegistryRef r t last :: TypeRef snm) t Source # 
Instance details

Defined in Mu.Adapter.ProtoBuf.Via

Methods

toProtoBufTypeRef :: Proxy ('RegistryRef r t last) -> t -> MessageBuilder Source #

(IsProtoSchema sch sty, ToSchema sch sty t) => ToProtoBufTypeRef ('SchemaRef sch sty :: TypeRef snm) t Source # 
Instance details

Defined in Mu.Adapter.ProtoBuf.Via

Methods

toProtoBufTypeRef :: Proxy ('SchemaRef sch sty) -> t -> MessageBuilder Source #

Orphan instances