8000 Add optional type on fields with export attribute · Issue #26 · nicolascotton/nject · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add optional type on fields with export attribute #26

New issue

Have a question about this project? Sign up for a free GitHub account to op 8000 en an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
4 tasks done
nicolascotton opened this issue Dec 3, 2023 · 0 comments · Fixed by #27
Closed
4 tasks done

Add optional type on fields with export attribute #26

nicolascotton opened this issue Dec 3, 2023 · 0 comments · Fixed by #27
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@nicolascotton
Copy link
Owner
nicolascotton commented Dec 3, 2023

Proposal:

trait Greeter {
    fn greet(&self) -> &str;
}

#[injectable]
struct GreeterOne;

impl Greeter for GreeterOne {
    fn greet(&self) -> &str {
        "One"
    }
}

#[module]
struct DynDepModule {
    #[export(dyn Greeter)]
    dyn_dep: GreeterOne,
}
  • Implementation
  • Tests
  • Bench
  • Docs
@nicolascotton nicolascotton added the enhancement New feature or request label Dec 3, 2023
@nicolascotton nicolascotton added this to the v0.3 milestone Dec 3, 2023
@nicolascotton nicolascotton self-assigned this Dec 3, 2023
@nicolascotton nicolascotton linked a pull request Dec 8, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant
0