| Crates.io | gag |
| lib.rs | gag |
| version | 1.0.0 |
| created_at | 2015-04-01 17:52:26.349407+00 |
| updated_at | 2021-05-30 17:18:57.458276+00 |
| description | Gag, redirect, or hold stdout/stderr output. Currently only *nix operating systems are supported. |
| homepage | |
| repository | https://github.com/Stebalien/gag-rs |
| max_upload_size | |
| id | 1757 |
| size | 14,709 |
Redirect and/or gag stdout/stderr.
Documentation (with examples): https://docs.rs/gag/
std::io::set_print (currently
unstable). Unfortunately, this function doesn't actually redirect the stdio
file descriptor, it just replaces the std::io::stdout writer.std::io::set_print to
redirect stdout. You can get around this though by using the --nocapture argument
when running your tests.impl<F> Redirect<F> where F: BorrowMut<T>, T: AsMut<AsRawFd> so I can write
file.borrow_mut().as_mut() but that would be ambiguous...