Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct Options;
- pub struct Generator<'a, 'b> {
- options: Options,
- context: &'a mut Context<'b>
- }
- struct Context<'a> {
- fds: Vec<FileDescriptor<'a>>
- }
- struct FileDescriptor<'a>(&'a u32);
- impl<'a> Context<'a> {
- pub fn input_files(&self) -> impl Iterator<Item = &FileDescriptor<'a>> {
- self.fds.iter()
- }
- }
- impl<'a, 'b> Generator<'a, 'b> {
- fn generate_externals_mod(&self) {
- let collected_input: Box<_> = self.context.input_files().collect();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement