pub trait ConnectionBindings: 'static {
type Deserializer: Deserializer;
type Serializer: Serializer;
type Reactor: MessageReactor<Inbound = <Self::Deserializer as Deserializer>::Message>;
type Stream: AsyncRead + AsyncWrite + Unpin + Send + 'static;
}Expand description
Define the types for a Connection.
A protosocket uses only 1 kind of message per port. This is a constraint to keep types
straightforward. If you want multiple message types, you should consider using protocol
buffers oneof fields. You would use a wrapper type to hold the oneof and any additional
metadata, like a request ID or trace id.
Required Associated Types§
Sourcetype Deserializer: Deserializer
type Deserializer: Deserializer
The deserializer for this connection.
Sourcetype Serializer: Serializer
type Serializer: Serializer
The serializer for this connection.
Sourcetype Reactor: MessageReactor<Inbound = <Self::Deserializer as Deserializer>::Message>
type Reactor: MessageReactor<Inbound = <Self::Deserializer as Deserializer>::Message>
The message reactor for this connection.