I'm writing a file parser that parses ".toml" files (using the toml-rs crate) into Rust data types. Right now my function accepts PathBuf for the file path. I want to make it generic so that it can accept any type of source that contains TOML:
- File paths,
PathBuforPath. - String that has toml data in it.
Is it possible to achieve this?