You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently building a server on top of the RPC interface needs a lot boilerplate code:
pubstructServer{...}implServer{pubfnnew() -> Arc<Self>{let server = Arc::new(Server{...});
server.add_rpc_handler();
server
}// boilerplate!fnadd_rpc_handler(self:Arc<Self>){let net = NetLocalHandle::current();let this = self.clone();
net.add_rpc_handler(move |req:Ping| {let this = this.clone();asyncmove{ this.ping(req)}});}fnping(&self,req:Ping){// handle RPC...}}
We hope to provide a procedural macro to make that easy:
Currently building a server on top of the RPC interface needs a lot boilerplate code:
We hope to provide a procedural macro to make that easy:
The text was updated successfully, but these errors were encountered: