pub struct Options {
pub url: Option<String>,
pub clipboard: bool,
pub host: Option<String>,
pub port: u16,
pub scheme: String,
pub path: String,
pub query: Option<String>,
pub fragment: Option<String>,
pub domain: Option<String>,
pub cafile: Option<PathBuf>,
pub run: bool,
}
Expand description
Options contains the CLI available options offered to the binary tool.
This struct maps all the options that are available to the CLI user.
of the binary enqueue-email
.
Fields§
§url: Option<String>
The URL to bookmark and enqueue. This excludes scheme, host, port and domain. This option has the priority over the Clipboard.
clipboard: bool
Use the URL currently on the top of the Clipboard. This option disables all the other defined options.
host: Option<String>
The host to connect to.
port: u16
The port to connect to.
scheme: String
The scheme protocol of the URI.
path: String
The path component in the URI. This follows the definitions of RFC2396 and RFC3986 (https://en.wikipedia.org/wiki/Uniform_Resource_Identifier).
query: Option<String>
An optional query component preceded by a question mark (?), containing a query string of non-hierarchical data.
fragment: Option<String>
An optional fragment component preceded by a hash (#).
domain: Option<String>
The domain to connect to. This may be different from the host!
cafile: Option<PathBuf>
A file with a certificate authority chain, allows to connect to certificate authories not included in the default set.
run: bool
Run msmt-queue and flush all mail currently in queue. This wraps the command ‘msmtp-queue -r’.
Trait Implementations§
Source§impl StructOpt for Options
impl StructOpt for Options
Source§fn from_clap(matches: &ArgMatches<'_>) -> Self
fn from_clap(matches: &ArgMatches<'_>) -> Self
clap::ArgMatches
. It’s guaranteed to succeed
if matches
originates from an App
generated by StructOpt::clap
called on
the same type, otherwise it must panic.Source§fn from_args() -> Selfwhere
Self: Sized,
fn from_args() -> Selfwhere
Self: Sized,
std::env::args_os
).
Calls clap::Error::exit
on failure, printing the error message and aborting the program.Source§fn from_args_safe() -> Result<Self, Error>where
Self: Sized,
fn from_args_safe() -> Result<Self, Error>where
Self: Sized,
std::env::args_os
).
Unlike StructOpt::from_args
, returns clap::Error
on failure instead of aborting the program,
so calling .exit
is up to you.Source§fn from_iter<I>(iter: I) -> Self
fn from_iter<I>(iter: I) -> Self
Vec
of your making.
Print the error message and quit the program in case of failure. Read more