pub struct MeshReviewRequestArgs {
pub subject: String,
pub session: String,
pub scope: Vec<String>,
pub issue: Option<String>,
pub reviewer: Option<String>,
pub body: Option<String>,
pub query: MeshQueryArgs,
}Expand description
mesh review request: what is to be read, who is asking, and optionally who is asked.
The subject is a branch, a commit or a pull request, written as the requester refers to
it; --scope is repeatable and narrows the request to the paths that matter, which is
what makes an answer cheap enough to be worth asking for. Leaving --reviewer unsaid
offers the request to every linked runtime rather than to none.
use clap::Parser;
use majordomus_cli::cli::{Cli, Command, MeshCommand, MeshReviewCommand,
MeshReviewRequestArgs};
let cli = Cli::try_parse_from([
"majordomus", "mesh", "review", "request", "feature/mesh-cooperation",
"--session", "s1", "--scope", "src/mesh", "--scope", "docs/MESH.md",
])
.unwrap();
let Command::Mesh(mesh) = cli.command else { panic!("expected `mesh`") };
let MeshCommand::Review(review) = mesh.command else { panic!("expected `review`") };
let MeshReviewCommand::Request(request) = review.command else { panic!("expected it") };
let request: MeshReviewRequestArgs = request;
assert_eq!(request.subject, "feature/mesh-cooperation");
assert_eq!(request.scope, ["src/mesh", "docs/MESH.md"]);
assert_eq!(request.reviewer, None, "unaddressed: any linked runtime may answer");Fields§
§subject: StringWhat to review: a branch, a commit, a pull request
session: StringThe requesting session’s id within this runtime
scope: Vec<String>A path the review covers (repeatable)
issue: Option<String>The issue
reviewer: Option<String>The runtime asked, <node>-<runtime>
body: Option<String>What the reviewer needs beyond the subject: evidence, commands, the question (up to 8 KiB)
query: MeshQueryArgsWhere the repository is and how to answer.
Trait Implementations§
Source§impl Args for MeshReviewRequestArgs
impl Args for MeshReviewRequestArgs
Source§fn group_id() -> Option<Id>
fn group_id() -> Option<Id>
Report the [
ArgGroup::id][crate::ArgGroup::id] for this set of argumentsSource§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Append to [
Command] so it can instantiate self via
[FromArgMatches::update_from_arg_matches_mut] Read moreSource§impl Debug for MeshReviewRequestArgs
impl Debug for MeshReviewRequestArgs
Source§impl FromArgMatches for MeshReviewRequestArgs
impl FromArgMatches for MeshReviewRequestArgs
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(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches to self.Auto Trait Implementations§
impl Freeze for MeshReviewRequestArgs
impl RefUnwindSafe for MeshReviewRequestArgs
impl Send for MeshReviewRequestArgs
impl Sync for MeshReviewRequestArgs
impl Unpin for MeshReviewRequestArgs
impl UnsafeUnpin for MeshReviewRequestArgs
impl UnwindSafe for MeshReviewRequestArgs
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