lapce-plugin-rust icon indicating copy to clipboard operation
lapce-plugin-rust copied to clipboard

Function to respond to a request from the client editor

Open MinusGix opened this issue 3 years ago • 0 comments

Currently, one can respond to a request (received in handle_request) by using object_to_stdout, but that is a poor API. Here's my idea of the function definition for responding:

/// `T` is the type of the request you're responding to
fn send_response<T: Request>(id: u64, params: T::Result);

So, knowing the request type (which they can presumably do), it enforces that the resulting type you send back is correct.

MinusGix avatar Sep 13 '22 13:09 MinusGix