Enum biir::utils::Output [−][src]
Expand description
common interface for writing to stdout as well as Vector, to allow integration tests
Variants
Stdout(Stdout)
Implementations
return string of everyting that has been written
use biir::utils::Output; let mut output = Output::Vector(Vec::new()); output.write("Hello, ".to_string()); output.write("world!".to_string()); assert_eq!(output.read(), "Hello, world!");
panic when used with Output::Stdout
use biir::utils::Output; let mut output = Output::Stdout(std::io::stdout()); let result = std::panic::catch_unwind(|| output.read()); assert!(result.is_err());
Auto Trait Implementations
impl RefUnwindSafe for Output
impl UnwindSafe for Output