toml-rs / toml

Rust TOML Parser
https://docs.rs/toml
Apache License 2.0
699 stars 104 forks source link

refactor: make repr more public #751

Closed ip1981 closed 2 months ago

ip1981 commented 2 months ago

We are implementing a library to access TOML data via a "TOML path" like foo[1].bar, similar to toml-cli. Reusing the key parser provided by the public interface is tricky but possible and would be desired. But for additional feature requirements (like wildcards) we cannot use existing parser, and we cannot create a key in our parser because we need to set Repr.

This patch makes more public relevant parts for working with Repr so that we can create keys within our parser.

epage commented 2 months ago

This is a significant API change in terms of exposing internals and should be discussed in an issue first.