pub enum RulesCommand {
Report {
state: Option<String>,
class: Option<String>,
namespace: Option<String>,
findings: bool,
check: bool,
},
Show {
id: String,
},
Proves {
id: String,
},
}Expand description
The subcommands of majordomus rules.
§Example
use majordomus_cli::cli::{Cli, Command, RulesCommand};
use clap::Parser;
let cli = Cli::try_parse_from(["majordomus", "rules", "show", "project.x"]).unwrap();
let Command::Rules(args) = cli.command else { panic!("not the rules command") };
assert!(matches!(args.command, RulesCommand::Show { .. }));Variants§
Report
Every rule against the proof there is for it
Fields
Show
One rule: what proves it, what it depends on, and what is missing
Proves
One test: every rule it proves, and the rules that would be left with none
Trait Implementations§
Source§impl Debug for RulesCommand
impl Debug for RulesCommand
Source§impl FromArgMatches for RulesCommand
impl FromArgMatches for RulesCommand
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>
Assign values from
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>
Assign values from
ArgMatches to self.Source§impl Subcommand for RulesCommand
impl Subcommand for RulesCommand
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
Append to [
Command] so it can instantiate self via
[FromArgMatches::update_from_arg_matches_mut] Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Test whether
Self can parse a specific subcommandAuto Trait Implementations§
impl Freeze for RulesCommand
impl RefUnwindSafe for RulesCommand
impl Send for RulesCommand
impl Sync for RulesCommand
impl Unpin for RulesCommand
impl UnsafeUnpin for RulesCommand
impl UnwindSafe for RulesCommand
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