The closest thing I think of given your example is how the --help flag in git displays the manpage instead of an option summary. Is that the sort of thing you have in mind?
I originally made this for an interactive index where you can query some document parts, and these parts are written in rst -- in essence, it's almost the same: rendering an arbitrary document into a string, that you may or may not manipulate later.