pub trait Channel<In: RpcMessage, Out: RpcMessage, T: ChannelTypes>: Debug + Clone + Send + Sync + 'static {
fn open_bi(&self) -> T::OpenBiFuture<'_, In, Out>;
fn accept_bi(&self) -> T::AcceptBiFuture<'_, In, Out>;
}Expand description
An abstract channel with typed input and output
This assumes cheap streams, so every interaction uses a new stream.
Heavily inspired by quinn, but uses concrete In and Out types instead of bytes. The reason for this is that
we want to be able to write a memory channel that does not serialize and deserialize.
Required Methods§
sourcefn open_bi(&self) -> T::OpenBiFuture<'_, In, Out>
fn open_bi(&self) -> T::OpenBiFuture<'_, In, Out>
Open a bidirectional stream
sourcefn accept_bi(&self) -> T::AcceptBiFuture<'_, In, Out>
fn accept_bi(&self) -> T::AcceptBiFuture<'_, In, Out>
Accept a bidirectional stream