Trait tower_lsp::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

§

type RequestStream = RequestStream

§

type ResponseSink = ResponseSink