pub trait ChannelTypes: Debug + Sized + Send + Sync + Unpin + Clone + 'static {
    type SendSink<M: RpcMessage>: Sink<M, Error = Self::SendError> + Send + Unpin + 'static;
    type RecvStream<M: RpcMessage>: Stream<Item = Result<M, Self::RecvError>> + Send + Unpin + 'static;
    type SendError: RpcError;
    type RecvError: RpcError;
    type OpenBiError: RpcError;
    type OpenBiFuture<'a, In: RpcMessage, Out: RpcMessage>: Future<Output = Result<(Self::SendSink<Out>, Self::RecvStream<In>), Self::OpenBiError>> + Send + 'a
    where
        Self: 'a
; type AcceptBiError: RpcError; type AcceptBiFuture<'a, In: RpcMessage, Out: RpcMessage>: Future<Output = Result<(Self::SendSink<Out>, Self::RecvStream<In>), Self::AcceptBiError>> + Send + 'a
    where
        Self: 'a
; type ClientChannel<In: RpcMessage, Out: RpcMessage>: ClientChannel<In, Out, Self>; type ServerChannel<In: RpcMessage, Out: RpcMessage>: ServerChannel<In, Out, Self>; }
Expand description

Defines a set of types for a kind of channel

Every distinct kind of channel has its own ChannelType. See e.g. crate::transport::MemChannelTypes.

Required Associated Types§

The sink used for sending either requests or responses on this channel

The stream used for receiving either requests or responses on this channel

Error you might get while sending messages to a sink

Error you might get while receiving messages from a stream

Error you might get when opening a new connection to the server

Future returned by open_bi

Error you might get when waiting for new streams on the server side

Future returned by accept_bi

Channel type

Channel type

Implementors§