Skip to content

derive should require methods to be async #571

Open
@tomusdrw

Description

@tomusdrw

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions