pub enum Commands {
SearchCrates {
query: String,
per_page: u32,
sort: SortKind,
page: u32,
page_token: Option<String>,
},
Readme {
crate_name: String,
crate_version: Option<String>,
},
GetItem {
crate_name: String,
item_type: String,
item_path: String,
crate_version: Option<String>,
suggest: bool,
},
SearchInCrate {
crate_name: String,
query: String,
crate_version: Option<String>,
item_type: Option<String>,
limit: u32,
match: String,
},
Version,
Doctor {
online: bool,
},
Commands,
Schema {
cmd: String,
},
Completions {
shell: Shell,
},
Cache {
action: CacheAction,
},
Config {
action: ConfigAction,
},
}Expand description
Product subcommands exposed on the CLI surface.
Variants§
SearchCrates
Search crates on crates.io
Fields
Readme
Fetch crate overview docblock from docs.rs (not git README)
Fields
GetItem
Fetch documentation for a typed item
Fields
item_type: StringKind: module|mod|struct|trait|enum|union|fn|function|method|type|const|constant|static|macro|attr|attribute|derive|variant|structfield|field
item_path: StringPath with :: or / (e.g. Runtime::new, runtime/Runtime, tokio::spawn)
method, type and const also accept Parent::member for members
that rustdoc renders as an anchor on the parent page instead of a page
of their own (iter::Iterator::Item, time::Duration::MAX).
crate_version: Option<String>Optional crate version (latest when omitted). Conflicts if it differs from crate@….
suggest: boolOn 404, always report the suggestion list, even when it is empty (“(none)”).
Recovery already ranks nearby symbols from all.html without this flag (exact/prefix/substring/edit-distance); the flag only guarantees the field is present so an agent can tell “no candidates” from “not tried”.
SearchInCrate
Search symbols in crate all.html index
Fields
Version
Print binary version
Doctor
Validate local TLS/config readiness
Commands
List the full command tree for agent discovery
Schema
Emit JSON Schema for a command
Completions
Generate shell completions
Cache
Inspect or clear the XDG HTTP disk cache
Fields
action: CacheActionCache maintenance action.
Config
Manage XDG config paths and the optional config.toml (no secrets / no .env)
Fields
action: ConfigActionConfig lifecycle action.
Implementations§
Trait Implementations§
Source§impl FromArgMatches for Commands
impl FromArgMatches for Commands
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 Commands
impl Subcommand for Commands
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