pub struct Args {
    pub config: Option<PathBuf>,
    pub server: Option<String>,
    pub auth: Option<String>,
    pub url: Option<String>,
    pub remote: Option<String>,
    pub files: Vec<String>,
    pub oneshot: bool,
    pub expire: Option<String>,
    pub prettify: bool,
    pub print_server_version: bool,
}
Expand description

Command-line arguments to parse.

Fields

config: Option<PathBuf>

Configuration file.

server: Option<String>

Server address.

auth: Option<String>

Authentication token.

url: Option<String>

URL to shorten.

remote: Option<String>

Remote URL to download file.

files: Vec<String>

Files to upload.

oneshot: bool

Whether if the file will disappear after being viewed once.

expire: Option<String>

Expiration time for the link.

prettify: bool

Prettify the program output.

print_server_version: bool

Whether if the server version should be printed.

Implementations

Parses the command-line arguments.

Trait Implementations

Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more

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.

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.