Trait quic_rpc::transport::ConnectionCommon

source ·
pub trait ConnectionCommon<In, Out>: ConnectionErrors {
    type RecvStream: Stream<Item = Result<In, Self::RecvError>> + Send + Sync + Unpin + 'static;
    type SendSink: Sink<Out, Error = Self::SendError> + Send + Sync + Unpin + 'static;
}
Expand description

Types that are common to both Connection and ServerEndpoint.

Having this as a separate trait is useful when writing generic code that works with both.

Required Associated Types§

source

type RecvStream: Stream<Item = Result<In, Self::RecvError>> + Send + Sync + Unpin + 'static

Receive side of a bidirectional typed channel

source

type SendSink: Sink<Out, Error = Self::SendError> + Send + Sync + Unpin + 'static

Send side of a bidirectional typed channel

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<A: Connection<S::Res, S::Req>, B: Connection<S::Res, S::Req>, S: Service> ConnectionCommon<<S as Service>::Res, <S as Service>::Req> for CombinedConnection<A, B, S>

source§

type RecvStream = RecvStream<A, B, <S as Service>::Res, <S as Service>::Req>

source§

type SendSink = SendSink<A, B, <S as Service>::Res, <S as Service>::Req>

source§

impl<A: ServerEndpoint<S::Req, S::Res>, B: ServerEndpoint<S::Req, S::Res>, S: Service> ConnectionCommon<<S as Service>::Req, <S as Service>::Res> for CombinedServerEndpoint<A, B, S>

source§

type RecvStream = RecvStream<A, B, <S as Service>::Req, <S as Service>::Res>

source§

type SendSink = SendSink<A, B, <S as Service>::Req, <S as Service>::Res>

source§

impl<In: RpcMessage, Out: RpcMessage> ConnectionCommon<In, Out> for ServerEndpoint<In, Out>

source§

impl<In: RpcMessage, Out: RpcMessage> ConnectionCommon<In, Out> for DummyServerEndpoint

source§

impl<S: Service> ConnectionCommon<<S as Service>::Req, <S as Service>::Res> for FlumeServerEndpoint<S>

source§

impl<S: Service> ConnectionCommon<<S as Service>::Req, <S as Service>::Res> for HyperServerEndpoint<S>

source§

impl<S: Service> ConnectionCommon<<S as Service>::Req, <S as Service>::Res> for QuinnServerEndpoint<S>

source§

impl<S: Service> ConnectionCommon<<S as Service>::Res, <S as Service>::Req> for Connection<S>

source§

impl<S: Service> ConnectionCommon<<S as Service>::Res, <S as Service>::Req> for FlumeConnection<S>

source§

impl<S: Service> ConnectionCommon<<S as Service>::Res, <S as Service>::Req> for HyperConnection<S>

source§

impl<S: Service> ConnectionCommon<<S as Service>::Res, <S as Service>::Req> for QuinnConnection<S>