Kixunil / configure_me

A Rust library for processing application configuration easily
62 stars 14 forks source link

Change sequence to map #47

Closed Kixunil closed 1 year ago

Kixunil commented 3 years ago

Consider changing sequence to map in specification Toml input. That means:

[[param]]
name = "foo"
type = "String"

would become:

[param.foo]
type = "String"

Alternative that makes Toml input map more directly to Rust code, catching duplicates much more early:

[field.foo]
cli = "param" # other possibilities: switch, disabled
type = "String"

So far I think I prefer the less verbose option, duplicate detection can be written differently.

@dr-orlovsky @romanz would appreciate your thoughts.

romanz commented 3 years ago

So far I think I prefer the less verbose option, duplicate detection can be written differently.

I agree.

dr-orlovsky commented 3 years ago

Agree