Type safety of `ConfigBuilder::set_default` in combination with `Config::try_deserialize`?
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 3.2k
- Forks
- 265
- Avg merge
- 2h 42m
- Merged PRs (30d)
- 4
Description
Currently, when setting defaults with ConfigBuilder::set_default there's no type safety when used in combination with Config::try_deserialize. Meaning, that if I change the type I'm serializing to, I might miss adjusting the set_default strings accordingly. Ideally those would be coupled to my type somehow.
Not sure if this even possible. I'd be interested in contributing if someone has an idea. Thanks for the config crate either way!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the APIs for ConfigBuilder::set_default and Config::try_deserialize, then inspect related type-handling behavior and tests in the repository. Define what type-safe coupling between defaults and deserialization would require, and consider the issue complete only when the intended behavior and its testable scope are established.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100