Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: ergonomic conversions (#5)
### Description This PR suggests the change of the methods for conversion to leverage the [From](https://doc.rust-lang.org/std/convert/trait.From.html) \ [TryFrom](https://doc.rust-lang.org/std/convert/trait.TryFrom.html) traits. ### Other changes (I can revert specific ones if don't agree) - Rename `input_yaml_conf` to `input_json_conf` since it seems like the default now is to use JSON. - Change the responsibility of who needs to verify the structural validity of the input (JSON/YAML). With the current proposal, the Session is constructed from a format validated value (`serde_json::Value`/`serde_yaml::Value`) and the caller is the one responsible for handling invalid format.
- Loading branch information