Skip to content

Draft: Work on RPC methods for generic types

Nick Mathewson requested to merge nickm/arti:generic_rpc_methods_v1 into main

This builds on my branch for !1225 (merged), and adds two additional commits.

It adds support for declaring RPC method implementations on generic object types, and for creating functions to dynamically add the appropriate entries for those implementations to a &mut DispatchTable.

I don't propose emerging this as-is: there are a couple more issues to solve here and the syntax is still gross. I'm putting it forward as a proof-of-concept to convince myself that this part can be solved.

The big remaining issues IMO are

  • Making sure that the "install these functions in that DispatchTable" function is always called when appropriate, at least once per [generic type, instantiation, disaptchtable] tuple.
  • Making sure that conflicting implementations can't be added.
  • Making the syntax "good enough for now."

Merge request reports