miniconf icon indicating copy to clipboard operation
miniconf copied to clipboard

Expose key docstring metadata

Open ryan-summers opened this issue 7 months ago • 1 comments

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

ryan-summers avatar Nov 14 '23 10:11 ryan-summers