pub enum TemplateAction {
List,
Show {
reference: String,
},
Create {
id: String,
name: Option<String>,
scope: Option<String>,
defaults: Vec<String>,
prompts: Vec<String>,
references: Vec<String>,
},
Update {
reference: String,
name: Option<String>,
scope: Option<String>,
defaults: Vec<String>,
prompts: Vec<String>,
references: Vec<String>,
},
Duplicate {
reference: String,
id: Option<String>,
name: Option<String>,
},
Delete {
reference: String,
yes: bool,
},
}Expand description
The tix template management tree (contracts/cli-surface.md).
list/show are read-only; the four mutations call one service that
validates the complete candidate registry before a single atomic
tix.toml save, so a refused operation leaves the file byte-identical.
Identity is the immutable stable ID: update changes a display name
without touching scope, defaults, prompts, references, or preserved
unknown metadata.
Variants§
List
List templates: one id<TAB>name<TAB>scope row each, in declaration order
Show
Show one template by stable ID (or a unique display name)
Create
Create a template under a new stable ID
Fields
defaults: Vec<String>A normal create default, FIELD=VALUE (repeatable). Supplying any
--default replaces the whole defaults block.
Update
Update the flags supplied, leaving every other stored field as it was
Fields
Duplicate
Copy a template to a new stable ID, leaving the source untouched
Fields
Delete
Delete a template definition (never the issues created from it)
Trait Implementations§
Source§impl FromArgMatches for TemplateAction
impl FromArgMatches for TemplateAction
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>
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>
ArgMatches to self.Source§impl Subcommand for TemplateAction
impl Subcommand for TemplateAction
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
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
Self can parse a specific subcommandAuto Trait Implementations§
impl Freeze for TemplateAction
impl RefUnwindSafe for TemplateAction
impl Send for TemplateAction
impl Sync for TemplateAction
impl Unpin for TemplateAction
impl UnsafeUnpin for TemplateAction
impl UnwindSafe for TemplateAction
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more