- Remove
_with_format
variants of functions in lieu of anOption<Format>
field in the Options structs. - Document enum generation
- Document enum generation at the top level, and in README
- Document that leaving out the const name will not generate a const
- Add options to implement Display and FromStr
- Add tests for enum generation
- Go over docs and README
- Release
- [/] Add feature-gated generation of an enum from filenames in a directory
- Should be (option for) repr()
- Should be guaranteed to be alphabetical
- And ignore subdirectories
- Should have a const method to return the original filename
- Should ignore the full parent path - since that's known at generation time
- Release again
- Address TODOs
- Consider replacing struct generation with use of the
quote!
crate
- Try to avoid generating the same structs twice
- Move to a more elegant method of code generation (quote! macro?)
- Move to a more elegant method of comparing types (not strings!!)
- Be smarter about types of collections:
[1, 2.0]
should resolve to[f32]
[10, null]
should resolve to[Option<i64>]
[[1.0], [1]]
should resolve to[[f32]]
[1.0, "hello"]
should throw a useful error[{"a": 1}, {"b": 5.0}]
should resolve to[struct {a: Option<i64>, b: Option<f64>}]
- Possibly allow some kind of type hints in the config itself
- e.g.
{"a__f32": 1.0, "b__f64": 1.0}
- e.g.
- And also possibly custom structs to be imported
- e.g.
{ "a__MyStruct": {...}}
=>use MyStruct; ...
etc.
- e.g.