pub struct Opt {
pub upgrade: bool,
pub daemon: bool,
pub nocapture: bool,
pub test: bool,
pub conf: Option<String>,
}Expand description
Command-line options
Call Opt::parse_args() to build this object from the process’s command line arguments.
Fields§
§upgrade: boolWhether this server should try to upgrade from a running old server
daemon: boolWhether this server should run in the background
nocapture: boolNot actually used. This flag is there so that the server is not upset seeing this flag
passed from cargo test sometimes
test: boolTest the configuration and exit
When this flag is set, calling server.bootstrap() will exit the process without errors
This flag is useful for upgrading service where the user wants to make sure the new service can start before shutting down the old server process.
conf: Option<String>The path to the configuration file.
See ServerConf for more details of the configuration file.
Implementations§
Source§impl Opt
Create an instance of Opt by parsing the current command-line args.
This is equivalent to running Opt::parse but does not require the
caller to have included the clap::Parser
impl Opt
Create an instance of Opt by parsing the current command-line args.
This is equivalent to running Opt::parse but does not require the
caller to have included the clap::Parser
pub fn parse_args() -> Self
Trait Implementations§
Source§impl CommandFactory for Opt
impl CommandFactory for Opt
Source§fn into_app_for_update<'b>() -> Command<'b>
fn into_app_for_update<'b>() -> Command<'b>
CommandFactory::command_for_updateSource§impl FromArgMatches for Opt
impl FromArgMatches for Opt
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.