Skip to content

derive should require methods to be async #571

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

Open
tomusdrw opened this issue Jul 27, 2020 · 0 comments
Open

derive should require methods to be async #571

tomusdrw opened this issue Jul 27, 2020 · 0 comments

Comments

@tomusdrw
Copy link
Contributor

Currently the jsonrpc-derive crate can only work with either Result or BoxFuture return types (see #565). Unfortunatelly traits don't support async methods yet, but there are polyfills like async-trait.

Long term, since derive is more opinionated than core, I think we should get rid of synchronous methods and require the jsonrpc-derive traits to have all methods async. This will simplify code handling (see WrapFuture) and would allow returning custom futures without Box::pining them.

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

No branches or pull requests

1 participant