Enum routinator::operation::Operation [−][src]
pub enum Operation { Init(Init), Server(Server), Vrps(Vrps), Validate(Validate), Update(Update), PrintConfig(PrintConfig), Dump(Dump), Man(Man), }
Expand description
The command to execute.
This type collects all the commands we have defined plus any possible extra configuration they support.
You can create a value from the command line arguments. First, you add
all necessary sub-commands and arguments to a clap App
via
config_args
and then process the argument matches into a value in
from_arg_matches
. Finally, you can execute the created command
through the run
method.
Variants
Tuple Fields of Init
0: Init
Tuple Fields of Server
0: Server
Tuple Fields of Vrps
0: Vrps
Tuple Fields of Validate
0: Validate
Tuple Fields of Update
0: Update
Tuple Fields of PrintConfig
0: PrintConfig
Tuple Fields of Dump
0: Dump
Tuple Fields of Man
0: Man
Implementations
Prepares everything.
Call this before doing anything else.
Adds the command configuration to a clap app.
pub fn from_arg_matches(
matches: &ArgMatches<'_>,
cur_dir: &Path,
config: &mut Config
) -> Result<Self, Failed>
pub fn from_arg_matches(
matches: &ArgMatches<'_>,
cur_dir: &Path,
config: &mut Config
) -> Result<Self, Failed>
Creates a command from clap matches.