Advertisement
Guest User

Untitled

a guest
Aug 24th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. #![feature(associated_type_defaults)]
  2.  
  3. fn main() {
  4. }
  5.  
  6. trait Object {
  7. type Vertex = dyn Content + Send + Sync + 'static;
  8. }
  9.  
  10. struct ObjectList {
  11. list: Vec<Box<dyn Object>>,
  12. }
  13.  
  14. // Example of object
  15. struct SimpleObject {
  16. vertices: Vec<PosTexNorm>,
  17. }
  18.  
  19. impl Object for SimpleObject {
  20. type Vertex = PosTexNorm;
  21. }
  22.  
  23. struct PosTexNorm {}
  24.  
  25. trait Content {}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement