Expand description
An opend outup stream which can provide a io::Write
interface.
Variants
StdOut(Stdout)
File(File)
Implementations
sourceimpl Output
impl Output
sourcepub fn new(io_arg: IoArg) -> Result<Self>
pub fn new(io_arg: IoArg) -> Result<Self>
Either calls stdout
or File::create
depending on io_arg
.
sourcepub fn into_write(self) -> Box<dyn Write>
pub fn into_write(self) -> Box<dyn Write>
Wraps either standard out or the file in a Box<dyn Write>
. In case of Output::StdOut
standard out will be locked. In case of Output::File
the file will be wrapped in
std::io::BufWriter
in order to minimize system calls.
Auto Trait Implementations
impl RefUnwindSafe for Output
impl Send for Output
impl Sync for Output
impl Unpin for Output
impl UnwindSafe for Output
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more