-
Notifications
You must be signed in to change notification settings - Fork 170
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
Proc macro example broken: Expecting something like Result<Foo, Err> #1136
Comments
Hey @SuperFluffy Which jsonrpsee version are you using? This example does only work on v0.18 |
@niklasad1 [package]
name = "jsonrpeesee_derive_example"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
jsonrpsee = { version = "0.18.2", features = ["client", "macros"] } |
Ah, yeah you are running into #1067 For now you have to change the API to: #[rpc(client, namespace = "foo")]
pub trait Rpc {
#[method(name = "foo")]
async fn async_method(&self, param_a: u8, param_b: String) -> Result<u16, Error>;
#[method(name = "bar")]
fn sync_method(&self) -> Result<String, Error>;
} |
Closing this duplicate to #1067 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Compiling (a reduced version of) the
jsonrpsee_proc_macros
example is currently broken:The reduced example (with
cargo add jsonrpsee --features client,macros
):From a quick look at git-blame this PR introduced the change enforcing
Result
: #977The text was updated successfully, but these errors were encountered: