Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open 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

Expose key docstring metadata #187

Open
ryan-summers opened this issue Nov 14, 2023 · 2 comments
Open

Expose key docstring metadata #187

ryan-summers opened this issue Nov 14, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@ryan-summers
Copy link
Member

As part of the derive macro, it would be useful to use a Key to look up the docstring related to the entry. For example:

#[derive(miniconf::Tree)]
struct Settings {
    /// The selected sampling rate in Hz.
    sample_rate: f32,
}

assert_eq!(Settings::get_metadata("/sample_rate", "The selected sampling rate in Hz."),

This would allow the code comments to be exposed as helpful information about the settings tree

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

No branches or pull requests

2 participants