Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. struct Options;
  2.  
  3. pub struct Generator<'a, 'b> {
  4. options: Options,
  5. context: &'a mut Context<'b>
  6. }
  7.  
  8. struct Context<'a> {
  9. fds: Vec<FileDescriptor<'a>>
  10. }
  11.  
  12. struct FileDescriptor<'a>(&'a u32);
  13.  
  14. impl<'a> Context<'a> {
  15. pub fn input_files(&self) -> impl Iterator<Item = &FileDescriptor<'a>> {
  16. self.fds.iter()
  17. }
  18. }
  19.  
  20. impl<'a, 'b> Generator<'a, 'b> {
  21. fn generate_externals_mod(&self) {
  22. let collected_input: Box<_> = self.context.input_files().collect();
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement