Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. trait Base{
  2. type Item;
  3. type Item2;
  4. }
  5.  
  6. trait Service {
  7. type R;
  8. type E;
  9. type C : Base<Item = Self::R, Item2 = Self::E>;
  10. }
  11.  
  12. struct Inner<T: Service> {
  13. service: T,
  14. }
  15.  
  16. struct S1<T: Service> {
  17. inner: Inner<T>,
  18. }
  19.  
  20. struct S2 {
  21. inner: Inner<ServiceImpl>,
  22. }
  23.  
  24. struct ServiceImpl {}
  25. impl Service for ServiceImpl {}
  26.  
  27. fn create() -> Service<R=u64, E=String>{ // хз что тут должно быть
  28.  
  29. }
  30.  
  31. fn main() {
  32. let a = S2{inner: create()};
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement