pub enum ServedCommand {
Observe {
commit: Option<String>,
url: Option<String>,
identity: Option<String>,
deployment: Option<String>,
timeout: Option<u64>,
dry_run: bool,
},
Forge,
Show {
commit: Option<String>,
deployment: Option<String>,
},
}Expand description
The subcommands of majordomus served: observe is the command line of
served.observe, forge of served.forge and show of served.show. observe and
forge reach the network, and each is a command line and nothing else.
use clap::Parser;
use majordomus_cli::cli::{Cli, Command, ServedCommand};
let cli = Cli::try_parse_from(["majordomus", "served", "observe", "--dry-run"]).unwrap();
let Command::Served(args) = cli.command else { panic!("served") };
assert!(matches!(args.command, ServedCommand::Observe { dry_run: true, .. }));
let cli = Cli::try_parse_from(["majordomus", "served", "forge"]).unwrap();
let Command::Served(args) = cli.command else { panic!("served") };
assert!(matches!(args.command, ServedCommand::Forge));Variants§
Observe
Probe the build identity a deployment serves, judge it against a commit and record it
Fields
Forge
Ask the forge which deployments and releases it recorded, and keep the answer for the readers
Show
Each deployment’s newest record, re-judged against a commit
Trait Implementations§
Source§impl Debug for ServedCommand
impl Debug for ServedCommand
Source§impl FromArgMatches for ServedCommand
impl FromArgMatches for ServedCommand
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 ServedCommand
impl Subcommand for ServedCommand
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 ServedCommand
impl RefUnwindSafe for ServedCommand
impl Send for ServedCommand
impl Sync for ServedCommand
impl Unpin for ServedCommand
impl UnsafeUnpin for ServedCommand
impl UnwindSafe for ServedCommand
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