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: bool
Whether this server should try to upgrade from a running old server
daemon: bool
Whether this server should run in the background
nocapture: bool
Not actually used. This flag is there so that the server is not upset seeing this flag
passed from cargo test
sometimes
test: bool
Test 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§
Trait Implementations§
Source§impl CommandFactory for Opt
impl CommandFactory for Opt
Source§fn into_app_for_update<'b>() -> App<'b>
fn into_app_for_update<'b>() -> App<'b>
Deprecated, replaced with
CommandFactory::command_for_update
Source§impl FromArgMatches for Opt
impl FromArgMatches for Opt
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Opt, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Opt, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Opt, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Opt, 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>
Assign values from
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>
Assign values from
ArgMatches
to self
.Source§impl Parser for Opt
impl Parser for Opt
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Parse from iterator, exit on error
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Parse from iterator, return Err on error.
Source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Update from iterator, exit on error
Auto Trait Implementations§
impl Freeze for Opt
impl RefUnwindSafe for Opt
impl Send for Opt
impl Sync for Opt
impl Unpin for Opt
impl UnwindSafe for Opt
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more