Enum io_arg::Output [−][src]
An opend outup stream which can provide a io::Write
interface.
Variants
StdOut(Stdout)
File(File)
Implementations
impl Output
[src]
impl Output
[src]pub fn new(io_arg: IoArg) -> Result<Self>
[src]
Either calls stdout
or File::create
depending on io_arg
.
pub fn write(&mut self) -> Box<dyn Write>
[src]
Wraps either standard out or the file in a Box<dyn Write>
. The resulting writer mutably
borrows the instance, since it may lock standard out. A file will be wrapped in a
BufWriter
in order to minimize system calls.
Auto Trait Implementations
impl RefUnwindSafe for Output
impl RefUnwindSafe for Output
impl UnwindSafe for Output
impl UnwindSafe for Output