pub fn collect_stream<F>(func: F) -> Result<String>Expand description
Collects text emitted by a callback into an owned string.
The callback receives a formatting writer backed by a new String. Its
error is propagated, and the buffer is returned only after the callback
succeeds.