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

Optional arguments #1

Open
jgraef opened this issue Mar 15, 2021 · 1 comment
Open

Optional arguments #1

jgraef opened this issue Mar 15, 2021 · 1 comment

Comments

@jgraef
Copy link
Contributor

jgraef commented Mar 15, 2021

Add support for optional arguments. We can either somehow interpret Option<T> arguments as optional or maybe add an attribute #[default] to tell the dispatcher-derive to use unwrap_or_default for this argument.

@sisou
Copy link
Member

sisou commented Mar 15, 2021

Additionally, when all arguments are optional (or the method doesn't take any arguments), the JSON-RPC spec says that the params property in the request object MAY also be omitted. This is currently not supported by this lib either.

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

2 participants