Function try_set_output_capture

pub fn try_set_output_capture(sink: Option<Arc<Mutex<Vec<u8>>>>) -> Result<Option<Arc<Mutex<Vec<u8>>>>, AccessError>

Tries to set the thread-local output capture buffer and returns the old one. This may fail once thread-local destructors are called. It's used in panic handling instead of set_output_capture.