Enum clio::Output[][src]

pub enum Output {
    Pipe,
    File(OsStringFile),
}

An enum that represents a command line output stream, either std out or a file

Variants

Pipe
File(OsStringFile)

Implementations

impl Output[src]

pub fn new<S: AsRef<OsStr>>(path: S) -> Result<Self>[src]

Contructs a new output either by opening/creating the file or for '-' returning stdout

pub fn try_from_os_str(path: &OsStr) -> Result<Self, OsString>[src]

Contructs a new output either by opening/creating the file or for '-' returning stdout The error is converted to a OsString so that stuctopt can show it to the user

pub fn finish(mut self: Self) -> Result<()>[src]

Syncs the file to disk or closes any HTTP connections and returns any errors or on the file if a regular file

Trait Implementations

impl Debug for Output[src]

impl Display for Output[src]

impl TryFrom<&'_ OsStr> for Output[src]

type Error = OsString

The type returned in the event of a conversion error.

impl Write for Output[src]

Auto Trait Implementations

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> ToString for T where
    T: Display + ?Sized
[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.