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.
Currently, one can respond to a request (received in
handle_request
) by usingobject_to_stdout
, but that is a poor API. Here's my idea of the function definition for responding:So, knowing the request type (which they can presumably do), it enforces that the resulting type you send back is correct.