pub enum MeshReviewCommand {
Request(MeshReviewRequestArgs),
Answer(MeshReviewAnswerArgs),
Withdraw(MeshReviewWithdrawArgs),
}Expand description
The two sides of a review on the mesh: request puts a subject and its scope in front
of the other runtimes, and answer records one runtime’s verdict on it. A request
names a reviewer only when it wants a particular one; unaddressed, it is an offer any
linked runtime may answer.
use clap::Parser;
use majordomus_cli::cli::{Cli, Command, MeshCommand, MeshReviewCommand};
let cli = Cli::try_parse_from([
"majordomus", "mesh", "review", "answer", "a1b2c3d4-r1/rev-2",
"--session", "s1", "--verdict", "approved",
])
.unwrap();
let Command::Mesh(mesh) = cli.command else { panic!("expected `mesh`") };
let MeshCommand::Review(review) = mesh.command else { panic!("expected `review`") };
let MeshReviewCommand::Answer(answer) = review.command else { panic!("expected `answer`") };
assert_eq!(answer.verdict, "approved");Variants§
Request(MeshReviewRequestArgs)
Ask for a review of a branch, commit or pull request
Answer(MeshReviewAnswerArgs)
Answer a review request
Withdraw(MeshReviewWithdrawArgs)
Withdraw a review request this runtime asked for, with its result
Trait Implementations§
Source§impl Debug for MeshReviewCommand
impl Debug for MeshReviewCommand
Source§impl FromArgMatches for MeshReviewCommand
impl FromArgMatches for MeshReviewCommand
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 MeshReviewCommand
impl Subcommand for MeshReviewCommand
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 MeshReviewCommand
impl RefUnwindSafe for MeshReviewCommand
impl Send for MeshReviewCommand
impl Sync for MeshReviewCommand
impl Unpin for MeshReviewCommand
impl UnsafeUnpin for MeshReviewCommand
impl UnwindSafe for MeshReviewCommand
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