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

[new proc macros]: doesn't support generic types in API definition. #426

Closed
niklasad1 opened this issue Aug 2, 2021 · 1 comment
Closed

Comments

@niklasad1
Copy link
Member

For example this doesn't work:

#[rpc(client, server, namespace = "foo")]
pub trait Rpc<T> {
    #[method(name = "foo")]
    async fn async_method(&self, t: T);
}

pub struct RpcServerImpl;

#[async_trait]
impl<T> RpcServer<T> for RpcServerImpl {
    async fn async_method(&self, t: T) {
        todo!();
    }
}
@niklasad1 niklasad1 changed the title [new proc macros]: doesn't support generic types in declaration. [new proc macros]: doesn't support generic types in API definition. Aug 2, 2021
@niklasad1
Copy link
Member Author

niklasad1 commented Sep 3, 2021

Fixed by #436

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