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

env: add a 'convert_case' field to ease dealing with kebab-case #381

Merged
merged 3 commits into from
Oct 10, 2022

Conversation

da-x
Copy link
Contributor

@da-x da-x commented Sep 29, 2022

This allows usage of kebab-case attribute in serde, mapping
unambiguously into a config value given a multiple character separator.

This also add the convert-case feature.

For example:

let environment = Environment::default()
    .prefix("PREFIX")
    .translate_key(Case::Kebab)
    .separator("__");

This allows usage of `kebab-case` attribute in serde, mapping
unambiguously into a config value given a multiple character separator.

This also add the `convert-case` feature.

For example:

    let environment = Environment::default()
        .prefix("PREFIX")
        .translate_key(Case::Kebab)
        .separator("__");
src/lib.rs Show resolved Hide resolved
@matthiasbeyer matthiasbeyer merged commit 1ccfc0a into mehcode:master Oct 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants