In xml-rs library doc, there are four structs, two from writer and two from reader. The documentation says two structs are re-exports, and the other two are shown as if they are written in lib.rs file. But all the structs are re-exports?
Why is the documentation shown this way?
In the case of
EventWriter, they are defined in public modules elsewhere in the crate, so when the root module re-exports them rustdoc refers to their original paths. For
ParserConfig, they’re defined in private modules (
reader::config). Rustdoc doesn’t want to show you those paths, because from the point of view of the user they don’t exist (there’s no module documentation for them), so it just makes them look like they’re defined at the point where they’re reexported, at the crate root.