Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #[repr(u32)]
- enum ConnectMethods {
- Bind = 0,
- Connect = 1,
- Disconnect = 2
- }
- struct ConnectService {}
- trait RPCService {
- type Method;
- }
- impl RPCService for ConnectService {
- type Method = ConnectMethods;
- }
- fn main() {
- let bind_id = <ConnectService as RPCService>::Method::Bind;
- }
Add Comment
Please, Sign In to add comment