Enum clio::SizedOutput[][src]

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

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

Pipe
File(OsStringFile)

Implementations

impl SizedOutput[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 with_len(self, size: u64) -> Result<Output>[src]

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

pub fn without_len(self) -> Result<Output>[src]

pub fn maybe_with_len(self, size: Option<u64>) -> Result<Output>[src]

Trait Implementations

impl Debug for SizedOutput[src]

impl Display for SizedOutput[src]

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

type Error = OsString

The type returned in the event of a conversion error.

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.