Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function to respond to a request from the client editor #10

Open
MinusGix opened this issue Sep 13, 2022 · 0 comments
Open

Function to respond to a request from the client editor #10

MinusGix opened this issue Sep 13, 2022 · 0 comments

Comments

@MinusGix
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant