Skip to content

Commit 12d0f02

Browse files
committed
Add documentation to local_error_handler
1 parent 52550d0 commit 12d0f02

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/io.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ impl Output {
3434
f(b)
3535
}
3636

37+
38+
/// Installs a thread local error handler.
39+
///
40+
/// Sometimes alsa-lib writes to stderr, but if you prefer, you can write it here instead.
41+
/// Should you wish to empty the buffer; just call local_error_handler again and drop the old instance.
3742
pub fn local_error_handler() -> Result<Rc<RefCell<Output>>> {
3843
let output = Output::buffer_open()?;
3944
let r = Rc::new(RefCell::new(output));

0 commit comments

Comments
 (0)