Trait async_zmq_types::InnerSocket
source · pub trait InnerSocket<T>: Sizedwhere
T: IntoInnerSocket + From<Self>,{
type Request: Future<Item = T>;
type Response: Future<Item = (Multipart, T)>;
type Stream: Stream<Item = Multipart>;
type Sink: Sink<SinkItem = Multipart>;
type SinkStream: Stream<Item = Multipart> + Sink<SinkItem = Multipart>;
fn send(self, multipart: Multipart) -> Self::Request;
fn recv(self) -> Self::Response;
fn stream(self) -> Self::Stream;
fn sink(self, buffer_size: usize) -> Self::Sink;
fn sink_stream(self, buffer_size: usize) -> Self::SinkStream;
}
Expand description
Define all actions possible on a socket
This should be generic enough to implement over any executor. On Tokio, this might consist of a Socket with an EventedFd, on Futures, it might just be a Socket.