Guest User

Untitled

a guest
Jul 17th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. #[repr(u32)]
  2. enum ConnectMethods {
  3. Bind = 0,
  4. Connect = 1,
  5. Disconnect = 2
  6. }
  7.  
  8. struct ConnectService {}
  9.  
  10. trait RPCService {
  11. type Method;
  12. }
  13.  
  14. impl RPCService for ConnectService {
  15. type Method = ConnectMethods;
  16. }
  17.  
  18. fn main() {
  19. let bind_id = <ConnectService as RPCService>::Method::Bind;
  20. }
Add Comment
Please, Sign In to add comment