This changes the transport connection and endpoint struct to be generic over S: Service instead of In: RpcMessage, Out: RpcMessage. With this change, the public API surface of a crate using quic-rpc can be reduced to only make the service struct public and hide the RPC message types.
E.g. in Iroh, a quic client would now be
Client<QuinnConnection<RpcService>>
instead of
Client<QuinnConnection<ProviderRequest, ProviderResponse>>
Breaking changes
The change breaks all transport types, they are now generic over S: Service instead of In: RpcMessage, Out: RpcMessage.
OK, so I am trying to come up with cases where this is limiting, but so far can't find any. Also it seems that transport::Connection is unaffected and still has two type parameters. So LGTM.
This changes the transport connection and endpoint struct to be generic over
S: Service
instead ofIn: RpcMessage, Out: RpcMessage
. With this change, the public API surface of a crate using quic-rpc can be reduced to only make the service struct public and hide the RPC message types.E.g. in Iroh, a quic client would now be
Client<QuinnConnection<RpcService>>
instead ofClient<QuinnConnection<ProviderRequest, ProviderResponse>>
Breaking changes
The change breaks all transport types, they are now generic over
S: Service
instead ofIn: RpcMessage, Out: RpcMessage
.