pub enum SizedOutput {
    Stdout(Stdout),
    Pipe(OsStringFile),
    File(OsStringFile),
}
Expand description

A builder for Output that allows setting the size before writing. This is mostly usefull with the “http” feature for setting the Content-Length header

Variants

Stdout(Stdout)

Pipe(OsStringFile)

File(OsStringFile)

Implementations

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

Contructs a new SizedOutput 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.

It is recomended that you use TryFrom::try_from and clap 3.0 instead.

set the length of the file, either as the content-length header of the http put

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The type returned in the event of a conversion error.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.