Registry / testing / gag
library1.0.0rscratesunverified

Gag, redirect, or hold stdout/stderr output on Unix systems.

# Cargo.toml [dependencies] gag = "1.0.0"
INSTALL
IMPORT
SIG · GAG
G
gag
testingrustv1.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Gag
use gag::Gag;

Minimal example suppressing stdout output using Gag.

use gag::Gag; fn main() { let _gag = Gag::stdout().unwrap(); println!("This won't be printed"); // Drop _gag to restore stdout }
Debug
Known issues
gotchaOnly works on Unix-like operating systems (Linux, macOS).
fix
Use conditional compilation or alternative crate for Windows.
affects: *
Upgrade
Version history
1.0.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
gag — cargo add gag · libregistry