If it can be done in this way, I think it's great. It's exactly what the iterator API is designed for. The other idea I had was to have a callback for looking up link refs, so you could write (for example) [Vec]
and the callback would supply an optional url and title. This would be conceptually identical to appending a bunch of these to the source, for every possible input the callback can process:
[Vec]: https://doc.rust-lang.org/std/vec/struct.Vec.html "Struct std::vec::Vec"
My feeling is that we want to be sensitive how well the Markdown will work when cut and pasted into a different processor, one without the fancy URL processing. What I like about the callback idea is that it renders as [Vec] in that case, which I think is suggestive as "there is a link but we don't have it".