Struct jirust_cli::args::commands::IssueArgs
source · pub struct IssueArgs {
pub issue_act: IssueActionValues,
pub project_key: String,
pub issue_key: Option<String>,
pub issue_fields: Option<Vec<(String, String)>>,
pub transition_to: Option<String>,
pub assignee: Option<String>,
pub pagination: PaginationArgs,
pub output: OutputArgs,
}Expand description
Available version command line arguments version_act: VersionActionValues Create, List, Update, Delete, Release, Archive
Fields§
§issue_act: IssueActionValuesIssue action
project_key: StringJira Project key
issue_key: Option<String>Jira Project issue key
issue_fields: Option<Vec<(String, String)>>Jira Project issue fields
transition_to: Option<String>Jira Project issue transition
assignee: Option<String>Jira Project issue assignee
pagination: PaginationArgsJira Project issue pagination
output: OutputArgsJira Project issue actions result output format
Trait Implementations§
source§impl Args for IssueArgs
impl Args for IssueArgs
source§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 From<&IssueArgs> for IssueCmdParams
impl From<&IssueArgs> for IssueCmdParams
Implementation of From trait for IssueCmdParams struct to convert IssueArgs struct to IssueCmdParams struct
source§fn from(value: &IssueArgs) -> Self
fn from(value: &IssueArgs) -> Self
Converts IssueArgs struct to IssueCmdParams struct to create a new IssueCmdParams instance
§Arguments
value- IssueArgs struct
§Returns
IssueCmdParams- Issue command parameters
§Examples
use jirust_cli::runners::jira_cmd_runners::issue_cmd_runner::IssueCmdParams;
use jirust_cli::args::commands::{IssueArgs, PaginationArgs, OutputArgs, IssueActionValues};
use std::collections::HashMap;
use serde_json::Value;
let issue_args = IssueArgs {
issue_act: IssueActionValues::Get,
project_key: "project_key".to_string(),
issue_key: Some("issue_key".to_string()),
issue_fields: Some(vec![("key".to_string(), r#"{ "key": "value" }"#.to_string())]),
transition_to: Some("transition_to".to_string()),
assignee: Some("assignee".to_string()),
pagination: PaginationArgs { page_size: Some(20), page_offset: None },
output: OutputArgs { output: None },
};
let params = IssueCmdParams::from(&issue_args);
assert_eq!(params.project_key, "project_key".to_string());
assert_eq!(params.issue_key.unwrap(), "issue_key".to_string());
assert_eq!(params.transition.unwrap(), "transition_to".to_string());
assert_eq!(params.assignee.unwrap(), "assignee".to_string());source§impl FromArgMatches for IssueArgs
impl FromArgMatches for IssueArgs
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 IssueArgs
impl RefUnwindSafe for IssueArgs
impl Send for IssueArgs
impl Sync for IssueArgs
impl Unpin for IssueArgs
impl UnwindSafe for IssueArgs
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