Enum io_arg::Output[][src]

pub enum Output {
    StdOut(Stdout),
    File(File),
}

An opend outup stream which can provide a io::Write interface.

Variants

StdOut(Stdout)
File(File)

Implementations

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 Send for Output

impl Sync for Output

impl Unpin for Output

impl UnwindSafe for Output

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.