pub trait TransportChannel: 'static {
type SinkError: Error + 'static + Sync + Send;
type StreamError: Error + 'static + Sync + Send;
type Input: Stream<Item = TransportInput<Self::StreamError>> + Unpin + Send + 'static;
type Output: Sink<RPCData, Error = Self::SinkError> + Unpin + Send + 'static;
// Required methods
fn spawn<Fut>(future: Fut)
where Fut: Future<Output = RPCResult<()>> + Send + 'static;
fn framed(self) -> (Self::Input, Self::Output);
}
Expand description
Define abstract transport channel for crate::Client
and crate::Server
Required Associated Types§
type StreamError: Error + 'static + Sync + Send
Sourcetype Input: Stream<Item = TransportInput<Self::StreamError>> + Unpin + Send + 'static
type Input: Stream<Item = TransportInput<Self::StreamError>> + Unpin + Send + 'static
type Output: Sink<RPCData, Error = Self::SinkError> + Unpin + Send + 'static
Required Methods§
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.