pub struct AgentArgs {
pub select: Vec<String>,
pub filter: Vec<String>,
pub sort_by: Option<String>,
pub dedupe_by: Option<String>,
pub max_items: Option<usize>,
pub count_only: bool,
pub truncate_content: Option<usize>,
pub max_output_bytes: Option<u64>,
}Expand description
Payload reduction knobs applied to the JSON envelope before it is written.
Every field is global = true, so the flags are accepted before or after the
subcommand. See crate::agent_ops for the fixed application order.
Fields§
§select: Vec<String>Project only these dotted keys (CSV or repeated). Missing keys are skipped, never null
filter: Vec<String>Keep only matching elements: key=value, key!=value, key~substring (repeat = AND)
A malformed expression fails with exit 65 instead of returning an empty set.
sort_by: Option<String>Sort elements ascending by this dotted key (stable; elements without it go last)
dedupe_by: Option<String>Drop later elements repeating this key’s value (elements without the key are kept)
max_items: Option<usize>Emit at most N elements, counted after –filter and –dedupe-by (0 emits none)
Bounds the emission, not the query: search-in-crate --limit is the query bound.
count_only: boolReplace the payload with {"count": N}, counted after –filter, –dedupe-by and –max-items
truncate_content: Option<usize>Shorten every string above N characters (never bytes; UTF-8 is never split)
max_output_bytes: Option<u64>Cap emitted payload size in bytes (hard max 2097152 = 2 MiB; cannot raise above)
Trait Implementations§
Source§impl Args for AgentArgs
impl Args for AgentArgs
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
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl FromArgMatches for AgentArgs
impl FromArgMatches for AgentArgs
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(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.