-
Notifications
You must be signed in to change notification settings - Fork 222
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
[RPC] add way to get a self-reference from within a method call #87
Comments
I spent a bit of time on this. My objective was to add a method Unfortunately, that solution doesn't work well with structs having generics. interface Interface(Qux) {
call @0 Inner2(Text) -> (qux :Qux, gen :TestGenerics(TestAllTypes, TestAnyPointer));
otherCall @1 Inner2(List(Text)) -> Inner2(List(Int16));
} The generated client takes 3 generics: Now, to return a typed client from Another solution, which doesn't require adding more generics to every generated parameter, is to have a thread local variable |
capnproto-c++ has
thisCap
.I imagine we could achieve something similar by adding a
get_self() -> Client
method toParamsHook
andParams
.The text was updated successfully, but these errors were encountered: