tower_lsp

Trait Loopback

Source
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§

Source

type RequestStream: Stream<Item = Request>

Yields a stream of pending server-to-client requests.

Source

type ResponseSink: Sink<Response> + Unpin

Routes client-to-server responses back to the server.

Required Methods§

Source

fn split(self) -> (Self::RequestStream, Self::ResponseSink)

Splits this socket into two halves capable of operating independently.

The two halves returned implement the Stream and Sink traits, respectively.

Implementors§

Source§

impl Loopback for ClientSocket

Source§

type RequestStream = RequestStream

Source§

type ResponseSink = ResponseSink