Guest User

Untitled

a guest
May 26th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. trait MyTrait<I, O> {
  2. type MyType;
  3.  
  4. fn my_method(&self);
  5.  
  6. fn dummy(_: std::marker::PhantomData<(I, O)>) {}
  7. }
  8.  
  9. impl<F, I, O> MyTrait<I, O> for F
  10. where
  11. F: Fn(I) -> O,
  12. {
  13. type MyType = F::Output;
  14.  
  15. fn my_method(&self) {}
  16.  
  17.  
  18. }
  19.  
  20. fn main() {}
Add Comment
Please, Sign In to add comment