pub enum DaemonMode {
Run,
Start,
Stop(StopOpts),
Restart(StopOpts),
Status,
ShortStatus,
STOP,
CONT,
KILL,
Log,
Logf,
}Expand description
You may want to use this as a normal argument, i.e. via FromStr,
instead, as then single strings can be passed through. There is
more flexibility with the options here, though. XX currently this
is also conflating STOP and Stop etc., and does not have up
etc. aliases, thus pretty unusable.
Variants§
Run
Do not put into background, just run forever in the foreground.
Start
Start daemon into background.
Stop(StopOpts)
Stop daemon running in background (does not stop daemons in
run mode, only those in start mode). This subcommand has
options.
Restart(StopOpts)
stop (ignoring errors) then start. This subcommand has
options.
Status
Report if there is a daemon in start or run mode, together
with pid if running and what the desired status is.
ShortStatus
Report if there is a daemon in start or run mode (without
additional information).
STOP
Send a STOP signal to (i.e. suspend) the daemon.
CONT
Send a CONT signal to (i.e. continue) the daemon.
KILL
Send a KILL signal to (i.e. terminate right away) the daemon.
Log
Open the current log file in the pager ($PAGER or ‘less’)
Logf
Run tail -f on the current log file
Trait Implementations§
Source§impl Clone for DaemonMode
impl Clone for DaemonMode
Source§fn clone(&self) -> DaemonMode
fn clone(&self) -> DaemonMode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DaemonMode
impl Debug for DaemonMode
Source§impl FromArgMatches for DaemonMode
impl FromArgMatches for DaemonMode
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<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl FromStr for DaemonMode
impl FromStr for DaemonMode
Source§impl Subcommand for DaemonMode
impl Subcommand for DaemonMode
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Source§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommand