rhq-core 0.3.0

Core library for rhq
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::fmt::Arguments;
use std::io::{self, Write};

#[derive(Default)]
pub struct Printer {
    pub(crate) verbose: bool,
}

impl Printer {
    pub fn print(&self, args: Arguments) {
        if self.verbose {
            let stdout = io::stdout();
            let _ = stdout.lock().write_fmt(args);
        }
    }
}