Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. trait MyTrait {
  2. type ReturnValue;
  3.  
  4. fn next(&self) -> Self::ReturnValue;
  5. }
  6.  
  7. struct Something {
  8. data: [u8; 16],
  9. }
  10.  
  11. impl MyTrait for Something {
  12. type ReturnValue = &'a [u8; 16];
  13.  
  14. fn next(&self) -> Self::ReturnValue {
  15. unimplemented!();
  16. }
  17. }
  18.  
  19.  
  20.  
  21. fn main() {
  22. println!("Hello, world!");
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement