-
Notifications
You must be signed in to change notification settings - Fork 25
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
fallback to a config file #275
Comments
could you let the user read the config and pass that as the payload? |
Problem is that I need to be able to query into that payload: "get field called |
API for
bpaf
can look like this:key
method toNamedField
to try to read next value that belongs to this keyenter
method toParser
- this method would move a cursor inside the ASTArgs
/State
API for applicative config reader can look like this:
enter(&mut self, key: &'static str)
- move to a tablekey
inside a current tablepop(&mut self)
- go one level upget(&mut self, key: &'static str) -> Option<&str>
- to to read next available value from akey
in a current tabledrain(&mut self, key: &'static)
- mark full key as parsed - successfully consumed itemapplicative reader needs to maintain a set of cursors - one for each field, similar to command line arguments reading should succeed only once,
bpaf
will handle cloning for forks.reader structure can be something like this:
toml_edit
seems to allow to do it in a serde-free way.many
,some
?The text was updated successfully, but these errors were encountered: