pub enum ContextAction {
Set {
flow: Option<String>,
label: Vec<String>,
param: Vec<String>,
global: bool,
user: bool,
},
Update {
flow: Option<String>,
label: Vec<String>,
param: Vec<String>,
remove_label: Vec<String>,
remove_param: Vec<String>,
global: bool,
user: bool,
},
Show,
Clear {
global: bool,
user: bool,
},
Source {
enable: bool,
disable: bool,
path: Option<String>,
default: bool,
},
}Expand description
Sub-actions for tracevault context.
Variants§
Set
Set the context, replacing any previously saved context entirely.
In a linked worktree the per-worktree file is written by default. In the primary checkout the global file is written. Use –global to force the global file from anywhere.
Omitted dimensions are left empty. This clears labels and params that are not re-specified.
Fields
Update
Update the existing context, merging changes in.
In a linked worktree the per-worktree file is updated by default. Use –global to force the global file from anywhere.
Sets –flow if provided; unions –label with existing; inserts/overwrites –param keys; removes –remove-label / –remove-param entries.
Fields
Show
Show the current context, layer by layer (pretty JSON).
Prints up to four sections: User (always; its header says whether the user layer is enabled and which file it reads), Global (repo-wide), This worktree (linked only), and Effective (the merged result that the hook stamps, each value annotated with the layer it came from).
Clear
Clear all context (flow, labels, params).
In a linked worktree the per-worktree file is cleared by default. Use –global to force clearing the global file from anywhere.
Fields
Source
Enable/disable or point the project’s user-level context source.
The mode flags are mutually exclusive: at most one may be given.
Trait Implementations§
Source§impl FromArgMatches for ContextAction
impl FromArgMatches for ContextAction
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 ContextAction
impl Subcommand for ContextAction
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 subcommand