pub trait Loopback {
type RequestStream: Stream<Item = Request>;
type ResponseSink: Sink<Response> + Unpin;
// Required method
fn split(self) -> (Self::RequestStream, Self::ResponseSink);
}
Expand description
Trait implemented by client loopback sockets.
This socket handles the server-to-client half of the bidirectional communication stream.
Required Associated Types§
sourcetype RequestStream: Stream<Item = Request>
type RequestStream: Stream<Item = Request>
Yields a stream of pending server-to-client requests.
sourcetype ResponseSink: Sink<Response> + Unpin
type ResponseSink: Sink<Response> + Unpin
Routes client-to-server responses back to the server.