paritytech / jsonrpsee

Rust JSON-RPC library on top of async/await
MIT License
598 stars 159 forks source link

Support AT or GAT? #1072

Open Dengjianping opened 1 year ago

Dengjianping commented 1 year ago

The compiler reports this error when I add a GAT.

error: Only methods allowed in RPC traits
  --> src/rpc/mod.rs:12:5
   |
12 |     type Item<'a> where Self: 'a;

Not sure there's a plan to support it.

niklasad1 commented 1 year ago

It's not supported yet, as the compiler says currently it's only allowed to add functions to the RPC trait i.e, not associated types.

Can you give an example what your trying to do and what's the benefit for jsonrpsee to support it? Thanks