Enum routinator::operation::Operation
source · pub enum Operation {
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 Command
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§
Server(Server)
Vrps(Vrps)
Validate(Validate)
Update(Update)
PrintConfig(PrintConfig)
Dump(Dump)
Man(Man)
Implementations§
source§impl Operation
impl Operation
sourcepub fn prepare() -> Result<(), Failed>
pub fn prepare() -> Result<(), Failed>
Prepares everything.
Call this before doing anything else.
sourcepub fn config_args<'a: 'b, 'b>(app: Command) -> Command
pub fn config_args<'a: 'b, 'b>(app: Command) -> Command
Adds the command configuration to a clap app.
Auto Trait Implementations§
impl RefUnwindSafe for Operation
impl Send for Operation
impl Sync for Operation
impl Unpin for Operation
impl UnwindSafe for Operation
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