quic_rpc::transport

Trait StreamTypes

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

Types that are common to both Connector and Listener.

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

Required Associated Types§

Source

type In: RpcMessage

The type of messages that can be received on the channel

Source

type Out: RpcMessage

The type of messages that can be sent on the channel

Source

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

Receive side of a bidirectional typed channel

Source

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

Send side of a bidirectional typed channel

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<A: Connector, B: Connector<In = A::In, Out = A::Out>> StreamTypes for CombinedConnector<A, B>

Source§

impl<A: Listener, B: Listener<In = A::In, Out = A::Out>> StreamTypes for CombinedListener<A, B>

Source§

impl<In, Out, C> StreamTypes for MappedConnector<In, Out, C>
where C: StreamTypes, In: RpcMessage + TryFrom<C::In>, Out: RpcMessage, C::Out: From<Out>,

Source§

impl<In, Out, C> StreamTypes for MappedStreamTypes<In, Out, C>
where C: StreamTypes, In: RpcMessage + TryFrom<C::In>, Out: RpcMessage, C::Out: From<Out>,

Source§

impl<In: RpcMessage, Out: RpcMessage> StreamTypes for BoxedConnector<In, Out>

Source§

impl<In: RpcMessage, Out: RpcMessage> StreamTypes for BoxedListener<In, Out>

Source§

impl<In: RpcMessage, Out: RpcMessage> StreamTypes for BoxedStreamTypes<In, Out>

Source§

impl<In: RpcMessage, Out: RpcMessage> StreamTypes for FlumeConnector<In, Out>

Source§

impl<In: RpcMessage, Out: RpcMessage> StreamTypes for FlumeListener<In, Out>

Source§

impl<In: RpcMessage, Out: RpcMessage> StreamTypes for HyperConnector<In, Out>

Source§

impl<In: RpcMessage, Out: RpcMessage> StreamTypes for HyperListener<In, Out>

Source§

impl<In: RpcMessage, Out: RpcMessage> StreamTypes for IrohConnector<In, Out>

Source§

impl<In: RpcMessage, Out: RpcMessage> StreamTypes for IrohListener<In, Out>

Source§

impl<In: RpcMessage, Out: RpcMessage> StreamTypes for DummyListener<In, Out>

Source§

impl<In: RpcMessage, Out: RpcMessage> StreamTypes for QuinnConnector<In, Out>

Source§

impl<In: RpcMessage, Out: RpcMessage> StreamTypes for QuinnListener<In, Out>