This repository has been archived on 2022-04-04. You can view files and clone it, but cannot push or open issues or pull requests.
ludum-dare-50/rustdoc/clap/struct.App.html

1309 lines
289 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Deprecated, replaced with [`Command`]"><meta name="keywords" content="rust, rustlang, rust-lang, App"><title>App in clap - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../dark.css" disabled><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../storage.js"></script><script src="../crates.js"></script><script defer src="../main.js"></script>
<noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../favicon.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a class="sidebar-logo" href="../clap/index.html"><div class="logo-container"><img src="https:&#x2F;&#x2F;raw.githubusercontent.com&#x2F;clap-rs&#x2F;clap&#x2F;master&#x2F;assets&#x2F;clap.png" alt="logo"></div>
</a><h2 class="location">Struct App</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.about">about</a><a href="#method.after_help">after_help</a><a href="#method.after_long_help">after_long_help</a><a href="#method.alias">alias</a><a href="#method.aliases">aliases</a><a href="#method.allow_external_subcommands">allow_external_subcommands</a><a href="#method.allow_hyphen_values">allow_hyphen_values</a><a href="#method.allow_invalid_utf8_for_external_subcommands">allow_invalid_utf8_for_external_subcommands</a><a href="#method.allow_missing_positional">allow_missing_positional</a><a href="#method.allow_negative_numbers">allow_negative_numbers</a><a href="#method.arg">arg</a><a href="#method.arg_required_else_help">arg_required_else_help</a><a href="#method.args">args</a><a href="#method.args_conflicts_with_subcommands">args_conflicts_with_subcommands</a><a href="#method.args_override_self">args_override_self</a><a href="#method.author">author</a><a href="#method.before_help">before_help</a><a href="#method.before_long_help">before_long_help</a><a href="#method.bin_name">bin_name</a><a href="#method.color">color</a><a href="#method.debug_assert">debug_assert</a><a href="#method.disable_colored_help">disable_colored_help</a><a href="#method.disable_help_flag">disable_help_flag</a><a href="#method.disable_help_subcommand">disable_help_subcommand</a><a href="#method.disable_version_flag">disable_version_flag</a><a href="#method.display_order">display_order</a><a href="#method.dont_collapse_args_in_usage">dont_collapse_args_in_usage</a><a href="#method.dont_delimit_trailing_values">dont_delimit_trailing_values</a><a href="#method.error">error</a><a href="#method.find_subcommand">find_subcommand</a><a href="#method.find_subcommand_mut">find_subcommand_mut</a><a href="#method.get_about">get_about</a><a href="#method.get_after_help">get_after_help</a><a href="#method.get_after_long_help">get_after_long_help</a><a href="#method.get_all_aliases">get_all_aliases</a><a href="#method.get_all_long_flag_aliases">get_all_long_flag_aliases</a><a href="#method.get_all_short_flag_aliases">get_all_short_flag_aliases</a><a href="#method.get_arg_conflicts_with">get_arg_conflicts_with</a><a href="#method.get_arguments">get_arguments</a><a href="#method.get_author">get_author</a><a href="#method.get_before_help">get_before_help</a><a href="#method.get_before_long_help">get_before_long_help</a><a href="#method.get_bin_name">get_bin_name</a><a href="#method.get_color">get_color</a><a href="#method.get_groups">get_groups</a><a href="#method.get_help_heading">get_help_heading</a><a href="#method.get_long_about">get_long_about</a><a href="#method.get_long_flag">get_long_flag</a><a href="#method.get_long_version">get_long_version</a><a href="#method.get_matches">get_matches</a><a href="#method.get_matches_from">get_matches_from</a><a href="#method.get_matches_mut">get_matches_mut</a><a href="#method.get_name">get_name</a><a href="#method.get_next_help_heading">get_next_help_heading</a><a href="#method.get_opts">get_opts</a><a href="#method.get_positionals">get_positionals</a><a href="#method.get_short_flag">get_short_flag</a><a href="#method.get_subcommand_help_heading">get_subcommand_help_heading</a><a href="#method.get_subcommand_value_name">get_subcommand_value_name</a><a href="#method.get_subcommands">get_subcommands</a><a href="#method.get_subcommands_mut">get_subcommands_mut</a><a href="#method.get_subommand_help_heading">get_subommand_help_heading</a><a href="#method.get_version">get_version</a><a href="#method.get_visible_aliases">get_visible_aliases</a><a href="#method.get_visible_long_flag_aliases">get_visible_long_flag_aliases</a><a href="#method.get_visible_short_flag_aliases">get_visible_short_flag_aliases</a><a href="#method.global_setting">global_setting</a><a href="#method.group">group</a><a href="#method.groups">groups</a><a href="#method.has_subcommands">has_subcommands</a><a href="#method.help_expected">help_expected</a><a href="#method.help_heading">help_heading</a><a href="#method.help_template">help_template</a><a href="#method.hide">hide</a><a href="#method.hide_possible_values">hide_possible_values</a><a href="#method.ignore_errors">ignore_errors</a><a href="#method.infer_long_args">infer_long_args</a><a href="#method.infer_subcommands">infer_subcommands</a><a href="#method.is_allow_external_subcommands_set">is_allow_external_subcommands_set</a><a href="#method.is_allow_invalid_utf8_for_external_subcommands_set">is_allow_invalid_utf8_for_external_subcommands_set</a><a href="#method.is_allow_missing_positional_set">is_allow_missing_positional_set</a><a href="#method.is_allow_negative_numbers_set">is_allow_negative_numbers_set</a><a href="#method.is_arg_required_else_help_set">is_arg_required_else_help_set</a><a href="#method.is_args_conflicts_with_subcommands_set">is_args_conflicts_with_subcommands_set</a><a href="#method.is_disable_colored_help_set">is_disable_colored_help_set</a><a href="#method.is_disable_help_flag_set">is_disable_help_flag_set</a><a href="#method.is_disable_help_subcommand_set">is_disable_help_subcommand_set</a><a href="#method.is_disable_version_flag_set">is_disable_version_flag_set</a><a href="#method.is_dont_collapse_args_in_usage_set">is_dont_collapse_args_in_usage_set</a><a href="#method.is_dont_delimit_trailing_values_set">is_dont_delimit_trailing_values_set</a><a href="#method.is_hide_set">is_hide_set</a><a href="#method.is_next_line_help_set">is_next_line_help_set</a><a href="#method.is_propagate_version_set">is_propagate_version_set</a><a href="#method.is_set">is_set</a><a href="#method.is_subcommand_negates_reqs_set">is_subcommand_negates_reqs_set</a><a href="#method.is_subcommand_precedence_over_arg_set">is_subcommand_precedence_over_arg_set</a><a href="#method.is_subcommand_required_set">is_subcommand_required_set</a><a href="#method.is_trailing_var_arg_set">is_trailing_var_arg_set</a><a href="#method.long_about">long_about</a><a href="#method.long_flag">long_flag</a><a href="#method.long_flag_alias">long_flag_alias</a><a href="#method.long_flag_aliases">long_flag_aliases</a><a href="#method.long_version">long_version</a><a href="#method.max_term_width">max_term_width</a><a href="#method.mut_arg">mut_arg</a><a href="#method.name">name</a><a href="#method.new">new</a><a href="#method.next_display_order">next_display_order</a><a href="#method.next_help_heading">next_help_heading</a><a href="#method.next_line_help">next_line_help</a><a href="#method.no_binary_name">no_binary_name</a><a href="#method.override_help">override_help</a><a href="#method.override_usage">override_usage</a><a href="#method.print_help">print_help</a><a href="#method.print_long_help">print_long_help</a><a href="#method.propagate_version">propagate_version</a><a href="#method.render_long_version">render_long_version</a><a href="#method.render_usage">render_usage</a><a href="#method.render_version">render_version</a><a href="#method.set_bin_name">set_bin_name</a><a href="#method.setting">setting</a><a href="#method.short_flag">short_flag</a><a href="#method.short_flag_alias">short_flag_alias</a><a href="#method.short_flag_aliases">short_flag_aliases</a><a href="#method.subcommand">subcommand</a><a href="#method.subcommand_help_heading">subcommand_help_heading</a><a href="#method.subcommand_negates_reqs">subcommand_negates_reqs</a><a href="#method.subcommand_precedence_over_arg">subcommand_precedence_over_arg</a><a href="#method.subcommand_required">subcommand_required</a><a href="#method.subcommand_value_name">subcommand_value_name</a><a href="#method.subcommands">subcommands</a><a href="#method.term_width">term_width</a><a href="#method.trailing_var_arg">trailing_var_arg</a><a href="#method.try_get_matches">try_get_matches</a><a href="#method.try_get_matches_from">try_get_matches_from</a><a href="#method.try_get_matches_from_mut">try_get_matches_from_mut</a><a href="#method.unset_global_setting">unset_global_setting</a><a href="#method.unset_setting">unset_setting</a><a href="#method.version">version</a><a href="#method.visible_alias">visible_alias</a><a href="#method.visible_aliases">visible_aliases</a><a href="#method.visible_long_flag_alias">visible_long_flag_alias</a><a href="#method.visible_long_flag_aliases">visible_long_flag_aliases</a><a href="#method.visible_short_flag_alias">visible_short_flag_alias</a><a href="#method.visible_short_flag_aliases">visible_short_flag_aliases</a><a href="#method.write_help">write_help</a><a href="#method.write_long_help">write_long_help</a></div><h3 class="sidebar-title"><a href="#trait-implementations">Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a><a href="#impl-Default">Default</a><a href="#impl-Display">Display</a><a href="#impl-Eq">Eq</a><a href="#impl-PartialEq%3CApp%3C%27help%3E%3E">PartialEq&lt;App&lt;&#39;help&gt;&gt;</a><a href="#impl-StructuralEq">StructuralEq</a><a href="#impl-StructuralPartialEq">StructuralPartialEq</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Equivalent%3CK%3E">Equivalent&lt;K&gt;</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-ToString">ToString</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><h2 class="location">Other items in<br><a href="index.html">clap</a></h2><div id="sidebar-vars" data-name="App" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../clap/index.html"><img src="https:&#x2F;&#x2F;raw.githubusercontent.com&#x2F;clap-rs&#x2F;clap&#x2F;master&#x2F;assets&#x2F;clap.png" alt="logo"></a><nav class="sub"><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="index.html">clap</a>::<wbr><a class="struct" href="#">App</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/clap/build/command.rs.html#75-110" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust struct"><code>pub struct App&lt;'help&gt; { /* fields omitted */ }</code></pre></div><div class="item-info"><div class="stab deprecated"><span class="emoji">👎</span> Deprecated since 3.1.0: <p>Replaced with <code>Command</code></p>
</div></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Deprecated, replaced with <a href="type.Command.html" title="Command"><code>Command</code></a></p>
</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#113-844" title="goto source code">[src]</a></div><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl&lt;'help&gt; <a class="struct" href="struct.App.html" title="struct clap::App">App</a>&lt;'help&gt;</h3></div></summary><div class="docblock"><h4 id="basic-api" class="section-header"><a href="#basic-api">Basic API</a></h4></div><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.new" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#129-157" title="goto source code">[src]</a></div><a href="#method.new" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.new" class="fnname">new</a>&lt;S:&nbsp;<a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;&gt;(name: S) -&gt; Self</h4></div></summary><div class="docblock"><p>Creates a new instance of an <code>Command</code>.</p>
<p>It is common, but not required, to use binary name as the <code>name</code>. This
name will only be displayed to the user when they request to print
version or help and usage information.</p>
<p>See also <a href="macro.command.html"><code>command!</code></a> and <a href="crate::crate_name!"><code>crate_name!</code></a>.</p>
<h5 id="examples" class="section-header"><a href="#examples">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="ident">Command::new</span>(<span class="string">&quot;My Program&quot;</span>)</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.arg" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#181-194" title="goto source code">[src]</a></div><a href="#method.arg" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.arg" class="fnname">arg</a>&lt;A:&nbsp;<a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="struct" href="struct.Arg.html" title="struct clap::Arg">Arg</a>&lt;'help&gt;&gt;&gt;(self, a: A) -&gt; Self</h4></div></summary><div class="docblock"><p>Adds an <a href="struct.Arg.html">argument</a> to the list of valid possibilities.</p>
<h5 id="examples-1" class="section-header"><a href="#examples-1">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
<span class="comment">// Adding a single &quot;flag&quot; argument with a short and help text, using Arg::new()</span>
.<span class="ident">arg</span>(
<span class="ident">Arg::new</span>(<span class="string">&quot;debug&quot;</span>)
.<span class="ident">short</span>(<span class="string">&#39;d&#39;</span>)
.<span class="ident">help</span>(<span class="string">&quot;turns on debugging mode&quot;</span>)
)
<span class="comment">// Adding a single &quot;option&quot; argument with a short, a long, and help text using the less</span>
<span class="comment">// verbose Arg::from()</span>
.<span class="ident">arg</span>(
<span class="macro">arg!</span>(<span class="op">-</span><span class="ident">c</span> <span class="op">-</span><span class="op">-</span><span class="ident">config</span> <span class="op">&lt;</span><span class="ident">CONFIG</span><span class="op">&gt;</span> <span class="string">&quot;Optionally sets a config file to use&quot;</span>)
)</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.args" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#211-224" title="goto source code">[src]</a></div><a href="#method.args" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.args" class="fnname">args</a>&lt;I, T&gt;(self, args: I) -&gt; Self <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&lt;Item = T&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="struct" href="struct.Arg.html" title="struct clap::Arg">Arg</a>&lt;'help&gt;&gt;,&nbsp;</span></h4></div></summary><div class="docblock"><p>Adds multiple <a href="struct.Arg.html">arguments</a> to the list of valid possibilities.</p>
<h5 id="examples-2" class="section-header"><a href="#examples-2">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">args</span>(<span class="kw-2">&amp;</span>[
<span class="macro">arg!</span>(<span class="string">&quot;[debug] -d &#39;turns on debugging info&#39;&quot;</span>),
<span class="ident">Arg::new</span>(<span class="string">&quot;input&quot;</span>).<span class="ident">index</span>(<span class="number">1</span>).<span class="ident">help</span>(<span class="string">&quot;the input file to use&quot;</span>)
])</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.mut_arg" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#251-271" title="goto source code">[src]</a></div><a href="#method.mut_arg" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.mut_arg" class="fnname">mut_arg</a>&lt;T, F&gt;(self, arg_id: T, f: F) -&gt; Self <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(<a class="struct" href="struct.Arg.html" title="struct clap::Arg">Arg</a>&lt;'help&gt;) -&gt; <a class="struct" href="struct.Arg.html" title="struct clap::Arg">Arg</a>&lt;'help&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;T: Key + <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;&amp;'help <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>&gt;,&nbsp;</span></h4></div></summary><div class="docblock"><p>Allows one to mutate an <a href="struct.Arg.html" title="Arg"><code>Arg</code></a> after its been added to an <a href="type.Command.html" title="Command"><code>Command</code></a>.</p>
<p>This can be useful for modifying the auto-generated help or version arguments.</p>
<h5 id="examples-3" class="section-header"><a href="#examples-3">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code>
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">cmd</span> <span class="op">=</span> <span class="ident">Command::new</span>(<span class="string">&quot;foo&quot;</span>)
.<span class="ident">arg</span>(<span class="ident">Arg::new</span>(<span class="string">&quot;bar&quot;</span>)
.<span class="ident">short</span>(<span class="string">&#39;b&#39;</span>))
.<span class="ident">mut_arg</span>(<span class="string">&quot;bar&quot;</span>, <span class="op">|</span><span class="ident">a</span><span class="op">|</span> <span class="ident">a</span>.<span class="ident">short</span>(<span class="string">&#39;B&#39;</span>));
<span class="kw">let</span> <span class="ident">res</span> <span class="op">=</span> <span class="ident">cmd</span>.<span class="ident">try_get_matches_from_mut</span>(<span class="macro">vec!</span>[<span class="string">&quot;foo&quot;</span>, <span class="string">&quot;-b&quot;</span>]);
<span class="comment">// Since we changed `bar`&#39;s short to &quot;B&quot; this should err as there</span>
<span class="comment">// is no `-b` anymore, only `-B`</span>
<span class="macro">assert!</span>(<span class="ident">res</span>.<span class="ident">is_err</span>());
<span class="kw">let</span> <span class="ident">res</span> <span class="op">=</span> <span class="ident">cmd</span>.<span class="ident">try_get_matches_from_mut</span>(<span class="macro">vec!</span>[<span class="string">&quot;foo&quot;</span>, <span class="string">&quot;-B&quot;</span>]);
<span class="macro">assert!</span>(<span class="ident">res</span>.<span class="ident">is_ok</span>());</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.group" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#306-309" title="goto source code">[src]</a></div><a href="#method.group" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.group" class="fnname">group</a>&lt;G:&nbsp;<a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="struct" href="struct.ArgGroup.html" title="struct clap::ArgGroup">ArgGroup</a>&lt;'help&gt;&gt;&gt;(self, group: G) -&gt; Self</h4></div></summary><div class="docblock"><p>Adds an <a href="struct.ArgGroup.html" title="ArgGroup"><code>ArgGroup</code></a> to the application.</p>
<p><a href="struct.ArgGroup.html" title="ArgGroup"><code>ArgGroup</code></a>s are a family of related arguments.
By placing them in a logical group, you can build easier requirement and exclusion rules.</p>
<p>Example use cases:</p>
<ul>
<li>Make an entire <a href="struct.ArgGroup.html" title="ArgGroup"><code>ArgGroup</code></a> required, meaning that one (and <em>only</em>
one) argument from that group must be present at runtime.</li>
<li>Name an <a href="struct.ArgGroup.html" title="ArgGroup"><code>ArgGroup</code></a> as a conflict to another argument.
Meaning any of the arguments that belong to that group will cause a failure if present with
the conflicting argument.</li>
<li>Ensure exclusion between arguments.</li>
<li>Extract a value from a group instead of determining exactly which argument was used.</li>
</ul>
<h5 id="examples-4" class="section-header"><a href="#examples-4">Examples</a></h5>
<p>The following example demonstrates using an <a href="struct.ArgGroup.html" title="ArgGroup"><code>ArgGroup</code></a> to ensure that one, and only one,
of the arguments from the specified group is present at runtime.</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="ident">Command::new</span>(<span class="string">&quot;cmd&quot;</span>)
.<span class="ident">arg</span>(<span class="macro">arg!</span>(<span class="string">&quot;--set-ver [ver] &#39;set the version manually&#39;&quot;</span>))
.<span class="ident">arg</span>(<span class="macro">arg!</span>(<span class="string">&quot;--major &#39;auto increase major&#39;&quot;</span>))
.<span class="ident">arg</span>(<span class="macro">arg!</span>(<span class="string">&quot;--minor &#39;auto increase minor&#39;&quot;</span>))
.<span class="ident">arg</span>(<span class="macro">arg!</span>(<span class="string">&quot;--patch &#39;auto increase patch&#39;&quot;</span>))
.<span class="ident">group</span>(<span class="ident">ArgGroup::new</span>(<span class="string">&quot;vers&quot;</span>)
.<span class="ident">args</span>(<span class="kw-2">&amp;</span>[<span class="string">&quot;set-ver&quot;</span>, <span class="string">&quot;major&quot;</span>, <span class="string">&quot;minor&quot;</span>,<span class="string">&quot;patch&quot;</span>])
.<span class="ident">required</span>(<span class="bool-val">true</span>))</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.groups" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#334-343" title="goto source code">[src]</a></div><a href="#method.groups" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.groups" class="fnname">groups</a>&lt;I, T&gt;(self, groups: I) -&gt; Self <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&lt;Item = T&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="struct" href="struct.ArgGroup.html" title="struct clap::ArgGroup">ArgGroup</a>&lt;'help&gt;&gt;,&nbsp;</span></h4></div></summary><div class="docblock"><p>Adds multiple <a href="struct.ArgGroup.html" title="ArgGroup"><code>ArgGroup</code></a>s to the <a href="type.Command.html" title="Command"><code>Command</code></a> at once.</p>
<h5 id="examples-5" class="section-header"><a href="#examples-5">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="ident">Command::new</span>(<span class="string">&quot;cmd&quot;</span>)
.<span class="ident">arg</span>(<span class="macro">arg!</span>(<span class="string">&quot;--set-ver [ver] &#39;set the version manually&#39;&quot;</span>))
.<span class="ident">arg</span>(<span class="macro">arg!</span>(<span class="string">&quot;--major &#39;auto increase major&#39;&quot;</span>))
.<span class="ident">arg</span>(<span class="macro">arg!</span>(<span class="string">&quot;--minor &#39;auto increase minor&#39;&quot;</span>))
.<span class="ident">arg</span>(<span class="macro">arg!</span>(<span class="string">&quot;--patch &#39;auto increase patch&#39;&quot;</span>))
.<span class="ident">arg</span>(<span class="macro">arg!</span>(<span class="string">&quot;-c [FILE] &#39;a config file&#39;&quot;</span>))
.<span class="ident">arg</span>(<span class="macro">arg!</span>(<span class="string">&quot;-i [IFACE] &#39;an interface&#39;&quot;</span>))
.<span class="ident">groups</span>(<span class="kw-2">&amp;</span>[
<span class="ident">ArgGroup::new</span>(<span class="string">&quot;vers&quot;</span>)
.<span class="ident">args</span>(<span class="kw-2">&amp;</span>[<span class="string">&quot;set-ver&quot;</span>, <span class="string">&quot;major&quot;</span>, <span class="string">&quot;minor&quot;</span>,<span class="string">&quot;patch&quot;</span>])
.<span class="ident">required</span>(<span class="bool-val">true</span>),
<span class="ident">ArgGroup::new</span>(<span class="string">&quot;input&quot;</span>)
.<span class="ident">args</span>(<span class="kw-2">&amp;</span>[<span class="string">&quot;c&quot;</span>, <span class="string">&quot;i&quot;</span>])
])</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.subcommand" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#367-370" title="goto source code">[src]</a></div><a href="#method.subcommand" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.subcommand" class="fnname">subcommand</a>&lt;S:&nbsp;<a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="struct" href="struct.App.html" title="struct clap::App">App</a>&lt;'help&gt;&gt;&gt;(self, subcmd: S) -&gt; Self</h4></div></summary><div class="docblock"><p>Adds a subcommand to the list of valid possibilities.</p>
<p>Subcommands are effectively sub-<a href="type.Command.html" title="Command"><code>Command</code></a>s, because they can contain their own arguments,
subcommands, version, usage, etc. They also function just like <a href="type.Command.html" title="Command"><code>Command</code></a>s, in that they get
their own auto generated help, version, and usage.</p>
<p>A subcommands <a href="struct.App.html#method.name" title="Command::name"><code>Command::name</code></a> will be used for:</p>
<ul>
<li>The argument the user passes in</li>
<li>Programmatically looking up the subcommand</li>
</ul>
<h5 id="examples-6" class="section-header"><a href="#examples-6">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">subcommand</span>(<span class="ident">Command::new</span>(<span class="string">&quot;config&quot;</span>)
.<span class="ident">about</span>(<span class="string">&quot;Controls configuration features&quot;</span>)
.<span class="ident">arg</span>(<span class="macro">arg!</span>(<span class="string">&quot;&lt;config&gt; &#39;Required configuration file to use&#39;&quot;</span>)))</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.subcommands" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#387-396" title="goto source code">[src]</a></div><a href="#method.subcommands" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.subcommands" class="fnname">subcommands</a>&lt;I, T&gt;(self, subcmds: I) -&gt; Self <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&lt;Item = T&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="struct" href="struct.App.html" title="struct clap::App">App</a>&lt;'help&gt;&gt;,&nbsp;</span></h4></div></summary><div class="docblock"><p>Adds multiple subcommands to the list of valid possibilities.</p>
<h5 id="examples-7" class="section-header"><a href="#examples-7">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code>.<span class="ident">subcommands</span>( <span class="macro">vec!</span>[
<span class="ident">Command::new</span>(<span class="string">&quot;config&quot;</span>).<span class="ident">about</span>(<span class="string">&quot;Controls configuration functionality&quot;</span>)
.<span class="ident">arg</span>(<span class="ident">Arg::new</span>(<span class="string">&quot;config_file&quot;</span>).<span class="ident">index</span>(<span class="number">1</span>)),
<span class="ident">Command::new</span>(<span class="string">&quot;debug&quot;</span>).<span class="ident">about</span>(<span class="string">&quot;Controls debug functionality&quot;</span>)])</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.debug_assert" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#428-430" title="goto source code">[src]</a></div><a href="#method.debug_assert" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.debug_assert" class="fnname">debug_assert</a>(self)</h4></div></summary><div class="docblock"><p>Catch problems earlier in the development cycle.</p>
<p>Most error states are handled as asserts under the assumption they are programming mistake
and not something to handle at runtime. Rather than relying on tests (manual or automated)
that exhaustively test your CLI to ensure the asserts are evaluated, this will run those
asserts in a way convenient for running as a test.</p>
<p><strong>Note::</strong> This will not help with asserts in <a href="struct.ArgMatches.html" title="ArgMatches"><code>ArgMatches</code></a>, those will need exhaustive
testing of your CLI.</p>
<h5 id="examples-8" class="section-header"><a href="#examples-8">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">fn</span> <span class="ident">cmd</span>() -&gt; <span class="ident">Command</span><span class="op">&lt;</span><span class="lifetime">&#39;static</span><span class="op">&gt;</span> {
<span class="ident">Command::new</span>(<span class="string">&quot;foo&quot;</span>)
.<span class="ident">arg</span>(<span class="ident">Arg::new</span>(<span class="string">&quot;bar&quot;</span>).<span class="ident">short</span>(<span class="string">&#39;b&#39;</span>)
)
}
<span class="attribute">#[<span class="ident">test</span>]</span>
<span class="kw">fn</span> <span class="ident">verify_app</span>() {
<span class="ident">cmd</span>().<span class="ident">debug_assert</span>();
}
<span class="kw">fn</span> <span class="ident">main</span>() {
<span class="kw">let</span> <span class="ident">m</span> <span class="op">=</span> <span class="ident">cmd</span>().<span class="ident">get_matches_from</span>(<span class="macro">vec!</span>[<span class="string">&quot;foo&quot;</span>, <span class="string">&quot;-b&quot;</span>]);
<span class="macro">println!</span>(<span class="string">&quot;{}&quot;</span>, <span class="ident">m</span>.<span class="ident">is_present</span>(<span class="string">&quot;bar&quot;</span>));
}</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.error" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#441-443" title="goto source code">[src]</a></div><a href="#method.error" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.error" class="fnname">error</a>(&amp;mut self, kind: <a class="enum" href="error/enum.ErrorKind.html" title="enum clap::error::ErrorKind">ErrorKind</a>, message: impl <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a>) -&gt; <a class="struct" href="error/struct.Error.html" title="struct clap::error::Error">Error</a></h4></div></summary><div class="docblock"><p>Custom error message for post-parsing validation</p>
<h5 id="examples-9" class="section-header"><a href="#examples-9">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">cmd</span> <span class="op">=</span> <span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>);
<span class="kw">let</span> <span class="ident">err</span> <span class="op">=</span> <span class="ident">cmd</span>.<span class="ident">error</span>(<span class="ident">ErrorKind::InvalidValue</span>, <span class="string">&quot;Some failure case&quot;</span>);</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.get_matches" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#462-464" title="goto source code">[src]</a></div><a href="#method.get_matches" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.get_matches" class="fnname">get_matches</a>(self) -&gt; <a class="struct" href="struct.ArgMatches.html" title="struct clap::ArgMatches">ArgMatches</a></h4></div></summary><div class="docblock"><p>Parse <a href="https://doc.rust-lang.org/1.59.0/std/env/fn.args_os.html"><code>env::args_os</code></a>, exiting on failure.</p>
<h5 id="panics" class="section-header"><a href="#panics">Panics</a></h5>
<p>If contradictory arguments or settings exist.</p>
<h5 id="examples-10" class="section-header"><a href="#examples-10">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let</span> <span class="ident">matches</span> <span class="op">=</span> <span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
<span class="comment">// Args and options go here...</span>
.<span class="ident">get_matches</span>();</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.get_matches_mut" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#485-488" title="goto source code">[src]</a></div><a href="#method.get_matches_mut" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.get_matches_mut" class="fnname">get_matches_mut</a>(&amp;mut self) -&gt; <a class="struct" href="struct.ArgMatches.html" title="struct clap::ArgMatches">ArgMatches</a></h4></div></summary><div class="docblock"><p>Parse <a href="https://doc.rust-lang.org/1.59.0/std/env/fn.args_os.html"><code>env::args_os</code></a>, exiting on failure.</p>
<p>Like <a href="struct.App.html#method.get_matches"><code>App::get_matches</code></a> but doesnt consume the <code>Command</code>.</p>
<h5 id="panics-1" class="section-header"><a href="#panics-1">Panics</a></h5>
<p>If contradictory arguments or settings exist.</p>
<h5 id="examples-11" class="section-header"><a href="#examples-11">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">cmd</span> <span class="op">=</span> <span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
<span class="comment">// Args and options go here...</span>
;
<span class="kw">let</span> <span class="ident">matches</span> <span class="op">=</span> <span class="ident">cmd</span>.<span class="ident">get_matches_mut</span>();</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_get_matches" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#519-522" title="goto source code">[src]</a></div><a href="#method.try_get_matches" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.try_get_matches" class="fnname">try_get_matches</a>(self) -&gt; <a class="type" href="error/type.Result.html" title="type clap::error::Result">ClapResult</a>&lt;<a class="struct" href="struct.ArgMatches.html" title="struct clap::ArgMatches">ArgMatches</a>&gt;</h4></div></summary><div class="docblock"><p>Parse <a href="https://doc.rust-lang.org/1.59.0/std/env/fn.args_os.html"><code>env::args_os</code></a>, returning a <a href="https://doc.rust-lang.org/1.59.0/core/result/enum.Result.html"><code>clap::Result</code></a> on failure.</p>
<p><strong>NOTE:</strong> This method WILL NOT exit when <code>--help</code> or <code>--version</code> (or short versions) are
used. It will return a <a href="error/struct.Error.html"><code>clap::Error</code></a>, where the <a href="error/struct.Error.html"><code>kind</code></a> is a
<a href="error/enum.ErrorKind.html#variant.DisplayHelp"><code>ErrorKind::DisplayHelp</code></a> or <a href="error/enum.ErrorKind.html#variant.DisplayVersion"><code>ErrorKind::DisplayVersion</code></a> respectively. You must call
<a href="error/struct.Error.html#method.exit"><code>Error::exit</code></a> or perform a <a href="https://doc.rust-lang.org/1.59.0/std/process/fn.exit.html"><code>std::process::exit</code></a>.</p>
<h5 id="panics-2" class="section-header"><a href="#panics-2">Panics</a></h5>
<p>If contradictory arguments or settings exist.</p>
<h5 id="examples-12" class="section-header"><a href="#examples-12">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let</span> <span class="ident">matches</span> <span class="op">=</span> <span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
<span class="comment">// Args and options go here...</span>
.<span class="ident">try_get_matches</span>()
.<span class="ident">unwrap_or_else</span>(<span class="op">|</span><span class="ident">e</span><span class="op">|</span> <span class="ident">e</span>.<span class="ident">exit</span>());</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.get_matches_from" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#546-555" title="goto source code">[src]</a></div><a href="#method.get_matches_from" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.get_matches_from" class="fnname">get_matches_from</a>&lt;I, T&gt;(self, itr: I) -&gt; <a class="struct" href="struct.ArgMatches.html" title="struct clap::ArgMatches">ArgMatches</a> <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&lt;Item = T&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.59.0/std/ffi/os_str/struct.OsString.html" title="struct std::ffi::os_str::OsString">OsString</a>&gt; + <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,&nbsp;</span></h4></div></summary><div class="docblock"><p>Parse the specified arguments, exiting on failure.</p>
<p><strong>NOTE:</strong> The first argument will be parsed as the binary name unless
<a href="struct.App.html#method.no_binary_name" title="Command::no_binary_name"><code>Command::no_binary_name</code></a> is used.</p>
<h5 id="panics-3" class="section-header"><a href="#panics-3">Panics</a></h5>
<p>If contradictory arguments or settings exist.</p>
<h5 id="examples-13" class="section-header"><a href="#examples-13">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let</span> <span class="ident">arg_vec</span> <span class="op">=</span> <span class="macro">vec!</span>[<span class="string">&quot;my_prog&quot;</span>, <span class="string">&quot;some&quot;</span>, <span class="string">&quot;args&quot;</span>, <span class="string">&quot;to&quot;</span>, <span class="string">&quot;parse&quot;</span>];
<span class="kw">let</span> <span class="ident">matches</span> <span class="op">=</span> <span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
<span class="comment">// Args and options go here...</span>
.<span class="ident">get_matches_from</span>(<span class="ident">arg_vec</span>);</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_get_matches_from" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#592-598" title="goto source code">[src]</a></div><a href="#method.try_get_matches_from" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.try_get_matches_from" class="fnname">try_get_matches_from</a>&lt;I, T&gt;(self, itr: I) -&gt; <a class="type" href="error/type.Result.html" title="type clap::error::Result">ClapResult</a>&lt;<a class="struct" href="struct.ArgMatches.html" title="struct clap::ArgMatches">ArgMatches</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&lt;Item = T&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.59.0/std/ffi/os_str/struct.OsString.html" title="struct std::ffi::os_str::OsString">OsString</a>&gt; + <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,&nbsp;</span></h4></div></summary><div class="docblock"><p>Parse the specified arguments, returning a <a href="https://doc.rust-lang.org/1.59.0/core/result/enum.Result.html"><code>clap::Result</code></a> on failure.</p>
<p><strong>NOTE:</strong> This method WILL NOT exit when <code>--help</code> or <code>--version</code> (or short versions) are
used. It will return a <a href="error/struct.Error.html"><code>clap::Error</code></a>, where the <a href="error/struct.Error.html"><code>kind</code></a> is a <a href="error/enum.ErrorKind.html#variant.DisplayHelp"><code>ErrorKind::DisplayHelp</code></a>
or <a href="error/enum.ErrorKind.html#variant.DisplayVersion"><code>ErrorKind::DisplayVersion</code></a> respectively. You must call <a href="error/struct.Error.html#method.exit"><code>Error::exit</code></a> or
perform a <a href="https://doc.rust-lang.org/1.59.0/std/process/fn.exit.html"><code>std::process::exit</code></a> yourself.</p>
<p><strong>NOTE:</strong> The first argument will be parsed as the binary name unless
<a href="struct.App.html#method.no_binary_name" title="Command::no_binary_name"><code>Command::no_binary_name</code></a> is used.</p>
<h5 id="panics-4" class="section-header"><a href="#panics-4">Panics</a></h5>
<p>If contradictory arguments or settings exist.</p>
<h5 id="examples-14" class="section-header"><a href="#examples-14">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let</span> <span class="ident">arg_vec</span> <span class="op">=</span> <span class="macro">vec!</span>[<span class="string">&quot;my_prog&quot;</span>, <span class="string">&quot;some&quot;</span>, <span class="string">&quot;args&quot;</span>, <span class="string">&quot;to&quot;</span>, <span class="string">&quot;parse&quot;</span>];
<span class="kw">let</span> <span class="ident">matches</span> <span class="op">=</span> <span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
<span class="comment">// Args and options go here...</span>
.<span class="ident">try_get_matches_from</span>(<span class="ident">arg_vec</span>)
.<span class="ident">unwrap_or_else</span>(<span class="op">|</span><span class="ident">e</span><span class="op">|</span> <span class="ident">e</span>.<span class="ident">exit</span>());</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_get_matches_from_mut" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#631-682" title="goto source code">[src]</a></div><a href="#method.try_get_matches_from_mut" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.try_get_matches_from_mut" class="fnname">try_get_matches_from_mut</a>&lt;I, T&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;itr: I<br>) -&gt; <a class="type" href="error/type.Result.html" title="type clap::error::Result">ClapResult</a>&lt;<a class="struct" href="struct.ArgMatches.html" title="struct clap::ArgMatches">ArgMatches</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&lt;Item = T&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.59.0/std/ffi/os_str/struct.OsString.html" title="struct std::ffi::os_str::OsString">OsString</a>&gt; + <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,&nbsp;</span></h4></div></summary><div class="docblock"><p>Parse the specified arguments, returning a <a href="https://doc.rust-lang.org/1.59.0/core/result/enum.Result.html"><code>clap::Result</code></a> on failure.</p>
<p>Like <a href="struct.App.html#method.try_get_matches_from"><code>App::try_get_matches_from</code></a> but doesnt consume the <code>Command</code>.</p>
<p><strong>NOTE:</strong> This method WILL NOT exit when <code>--help</code> or <code>--version</code> (or short versions) are
used. It will return a <a href="error/struct.Error.html"><code>clap::Error</code></a>, where the <a href="error/struct.Error.html"><code>kind</code></a> is a <a href="error/enum.ErrorKind.html#variant.DisplayHelp" title="ErrorKind::DisplayHelp"><code>ErrorKind::DisplayHelp</code></a>
or <a href="error/enum.ErrorKind.html#variant.DisplayVersion" title="ErrorKind::DisplayVersion"><code>ErrorKind::DisplayVersion</code></a> respectively. You must call <a href="error/struct.Error.html#method.exit" title="Error::exit"><code>Error::exit</code></a> or
perform a <a href="https://doc.rust-lang.org/1.59.0/std/process/fn.exit.html" title="std::process::exit"><code>std::process::exit</code></a> yourself.</p>
<p><strong>NOTE:</strong> The first argument will be parsed as the binary name unless
<a href="struct.App.html#method.no_binary_name" title="Command::no_binary_name"><code>Command::no_binary_name</code></a> is used.</p>
<h5 id="panics-5" class="section-header"><a href="#panics-5">Panics</a></h5>
<p>If contradictory arguments or settings exist.</p>
<h5 id="examples-15" class="section-header"><a href="#examples-15">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let</span> <span class="ident">arg_vec</span> <span class="op">=</span> <span class="macro">vec!</span>[<span class="string">&quot;my_prog&quot;</span>, <span class="string">&quot;some&quot;</span>, <span class="string">&quot;args&quot;</span>, <span class="string">&quot;to&quot;</span>, <span class="string">&quot;parse&quot;</span>];
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">cmd</span> <span class="op">=</span> <span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>);
<span class="comment">// Args and options go here...</span>
<span class="kw">let</span> <span class="ident">matches</span> <span class="op">=</span> <span class="ident">cmd</span>.<span class="ident">try_get_matches_from_mut</span>(<span class="ident">arg_vec</span>)
.<span class="ident">unwrap_or_else</span>(<span class="op">|</span><span class="ident">e</span><span class="op">|</span> <span class="ident">e</span>.<span class="ident">exit</span>());</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.print_help" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#696-704" title="goto source code">[src]</a></div><a href="#method.print_help" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.print_help" class="fnname">print_help</a>(&amp;mut self) -&gt; <a class="type" href="https://doc.rust-lang.org/1.59.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.unit.html">()</a>&gt;</h4></div></summary><div class="docblock"><p>Prints the short help message (<code>-h</code>) to <a href="https://doc.rust-lang.org/1.59.0/std/io/stdio/fn.stdout.html"><code>io::stdout()</code></a>.</p>
<p>See also <a href="struct.App.html#method.print_long_help" title="Command::print_long_help"><code>Command::print_long_help</code></a>.</p>
<h5 id="examples-16" class="section-header"><a href="#examples-16">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">cmd</span> <span class="op">=</span> <span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>);
<span class="ident">cmd</span>.<span class="ident">print_help</span>();</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.print_long_help" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#721-729" title="goto source code">[src]</a></div><a href="#method.print_long_help" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.print_long_help" class="fnname">print_long_help</a>(&amp;mut self) -&gt; <a class="type" href="https://doc.rust-lang.org/1.59.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.unit.html">()</a>&gt;</h4></div></summary><div class="docblock"><p>Prints the long help message (<code>--help</code>) to <a href="https://doc.rust-lang.org/1.59.0/std/io/stdio/fn.stdout.html"><code>io::stdout()</code></a>.</p>
<p>See also <a href="struct.App.html#method.print_help" title="Command::print_help"><code>Command::print_help</code></a>.</p>
<h5 id="examples-17" class="section-header"><a href="#examples-17">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">cmd</span> <span class="op">=</span> <span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>);
<span class="ident">cmd</span>.<span class="ident">print_long_help</span>();</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.write_help" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#747-753" title="goto source code">[src]</a></div><a href="#method.write_help" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.write_help" class="fnname">write_help</a>&lt;W:&nbsp;<a class="trait" href="https://doc.rust-lang.org/1.59.0/std/io/trait.Write.html" title="trait std::io::Write">Write</a>&gt;(&amp;mut self, w: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.reference.html">&amp;mut </a>W) -&gt; <a class="type" href="https://doc.rust-lang.org/1.59.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.unit.html">()</a>&gt;</h4></div></summary><div class="docblock"><p>Writes the short help message (<code>-h</code>) to a <a href="https://doc.rust-lang.org/1.59.0/std/io/trait.Write.html"><code>io::Write</code></a> object.</p>
<p>See also <a href="struct.App.html#method.write_long_help" title="Command::write_long_help"><code>Command::write_long_help</code></a>.</p>
<h5 id="examples-18" class="section-header"><a href="#examples-18">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use</span> <span class="ident">std::io</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">cmd</span> <span class="op">=</span> <span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>);
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">out</span> <span class="op">=</span> <span class="ident">io::stdout</span>();
<span class="ident">cmd</span>.<span class="ident">write_help</span>(<span class="kw-2">&amp;mut</span> <span class="ident">out</span>).<span class="ident">expect</span>(<span class="string">&quot;failed to write to stdout&quot;</span>);</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.write_long_help" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#771-777" title="goto source code">[src]</a></div><a href="#method.write_long_help" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.write_long_help" class="fnname">write_long_help</a>&lt;W:&nbsp;<a class="trait" href="https://doc.rust-lang.org/1.59.0/std/io/trait.Write.html" title="trait std::io::Write">Write</a>&gt;(&amp;mut self, w: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.reference.html">&amp;mut </a>W) -&gt; <a class="type" href="https://doc.rust-lang.org/1.59.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.unit.html">()</a>&gt;</h4></div></summary><div class="docblock"><p>Writes the long help message (<code>--help</code>) to a <a href="https://doc.rust-lang.org/1.59.0/std/io/trait.Write.html"><code>io::Write</code></a> object.</p>
<p>See also <a href="struct.App.html#method.write_help" title="Command::write_help"><code>Command::write_help</code></a>.</p>
<h5 id="examples-19" class="section-header"><a href="#examples-19">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use</span> <span class="ident">std::io</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">cmd</span> <span class="op">=</span> <span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>);
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">out</span> <span class="op">=</span> <span class="ident">io::stdout</span>();
<span class="ident">cmd</span>.<span class="ident">write_long_help</span>(<span class="kw-2">&amp;mut</span> <span class="ident">out</span>).<span class="ident">expect</span>(<span class="string">&quot;failed to write to stdout&quot;</span>);</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.render_version" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#799-801" title="goto source code">[src]</a></div><a href="#method.render_version" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.render_version" class="fnname">render_version</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></div></summary><div class="docblock"><p>Version message rendered as if the user ran <code>-V</code>.</p>
<p>See also <a href="struct.App.html#method.render_long_version" title="Command::render_long_version"><code>Command::render_long_version</code></a>.</p>
<h6 id="coloring" class="section-header"><a href="#coloring">Coloring</a></h6>
<p>This function does not try to color the message nor it inserts any <a href="https://en.wikipedia.org/wiki/ANSI_escape_code">ANSI escape codes</a>.</p>
<h6 id="examples-20" class="section-header"><a href="#examples-20">Examples</a></h6>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use</span> <span class="ident">std::io</span>;
<span class="kw">let</span> <span class="ident">cmd</span> <span class="op">=</span> <span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>);
<span class="macro">println!</span>(<span class="string">&quot;{}&quot;</span>, <span class="ident">cmd</span>.<span class="ident">render_version</span>());</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.render_long_version" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#823-825" title="goto source code">[src]</a></div><a href="#method.render_long_version" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.render_long_version" class="fnname">render_long_version</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></div></summary><div class="docblock"><p>Version message rendered as if the user ran <code>--version</code>.</p>
<p>See also <a href="struct.App.html#method.render_version" title="Command::render_version"><code>Command::render_version</code></a>.</p>
<h6 id="coloring-1" class="section-header"><a href="#coloring-1">Coloring</a></h6>
<p>This function does not try to color the message nor it inserts any <a href="https://en.wikipedia.org/wiki/ANSI_escape_code">ANSI escape codes</a>.</p>
<h6 id="examples-21" class="section-header"><a href="#examples-21">Examples</a></h6>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use</span> <span class="ident">std::io</span>;
<span class="kw">let</span> <span class="ident">cmd</span> <span class="op">=</span> <span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>);
<span class="macro">println!</span>(<span class="string">&quot;{}&quot;</span>, <span class="ident">cmd</span>.<span class="ident">render_long_version</span>());</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.render_usage" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#837-843" title="goto source code">[src]</a></div><a href="#method.render_usage" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.render_usage" class="fnname">render_usage</a>(&amp;mut self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></div></summary><div class="docblock"><p>Usage statement</p>
<h6 id="examples-22" class="section-header"><a href="#examples-22">Examples</a></h6>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use</span> <span class="ident">std::io</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">cmd</span> <span class="op">=</span> <span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>);
<span class="macro">println!</span>(<span class="string">&quot;{}&quot;</span>, <span class="ident">cmd</span>.<span class="ident">render_usage</span>());</code></pre></div>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-1" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#850-1330" title="goto source code">[src]</a></div><a href="#impl-1" class="anchor"></a><h3 class="code-header in-band">impl&lt;'help&gt; <a class="struct" href="struct.App.html" title="struct clap::App">App</a>&lt;'help&gt;</h3></div></summary><div class="docblock"><h4 id="application-wide-settings" class="section-header"><a href="#application-wide-settings">Application-wide Settings</a></h4>
<p>These settings will apply to the top-level command and all subcommands, by default. Some
settings can be overridden in subcommands.</p>
</div><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.no_binary_name" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#870-876" title="goto source code">[src]</a></div><a href="#method.no_binary_name" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.no_binary_name" class="fnname">no_binary_name</a>(self, yes: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>Specifies that the parser should not assume the first argument passed is the binary name.</p>
<p>This is normally the case when using a “daemon” style mode, or an interactive CLI where
one would not normally type the binary or program name for each command.</p>
<h5 id="examples-23" class="section-header"><a href="#examples-23">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let</span> <span class="ident">m</span> <span class="op">=</span> <span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">no_binary_name</span>(<span class="bool-val">true</span>)
.<span class="ident">arg</span>(<span class="macro">arg!</span>(<span class="op">&lt;</span><span class="ident">cmd</span><span class="op">&gt;</span> ... <span class="string">&quot;commands to run&quot;</span>))
.<span class="ident">get_matches_from</span>(<span class="macro">vec!</span>[<span class="string">&quot;command&quot;</span>, <span class="string">&quot;set&quot;</span>]);
<span class="kw">let</span> <span class="ident">cmds</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="kw-2">&amp;</span><span class="ident">str</span><span class="op">&gt;</span> <span class="op">=</span> <span class="ident">m</span>.<span class="ident">values_of</span>(<span class="string">&quot;cmd&quot;</span>).<span class="ident">unwrap</span>().<span class="ident">collect</span>();
<span class="macro">assert_eq!</span>(<span class="ident">cmds</span>, [<span class="string">&quot;command&quot;</span>, <span class="string">&quot;set&quot;</span>]);</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.ignore_errors" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#904-910" title="goto source code">[src]</a></div><a href="#method.ignore_errors" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.ignore_errors" class="fnname">ignore_errors</a>(self, yes: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>Try not to fail on parse errors, like missing option values.</p>
<p><strong>Note:</strong> Make sure you apply it as <code>global_setting</code> if you want this setting
to be propagated to subcommands and sub-subcommands!</p>
<p><strong>NOTE:</strong> This choice is propagated to all child subcommands.</p>
<h5 id="examples-24" class="section-header"><a href="#examples-24">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let</span> <span class="ident">cmd</span> <span class="op">=</span> <span class="ident">Command::new</span>(<span class="string">&quot;cmd&quot;</span>)
.<span class="ident">ignore_errors</span>(<span class="bool-val">true</span>)
.<span class="ident">arg</span>(<span class="macro">arg!</span>(<span class="op">-</span><span class="ident">c</span> <span class="op">-</span><span class="op">-</span><span class="ident">config</span> <span class="op">&lt;</span><span class="ident">FILE</span><span class="op">&gt;</span> <span class="string">&quot;Sets a custom config file&quot;</span>).<span class="ident">required</span>(<span class="bool-val">false</span>))
.<span class="ident">arg</span>(<span class="macro">arg!</span>(<span class="op">-</span><span class="ident">x</span> <span class="op">-</span><span class="op">-</span><span class="ident">stuff</span> <span class="op">&lt;</span><span class="ident">FILE</span><span class="op">&gt;</span> <span class="string">&quot;Sets a custom stuff file&quot;</span>).<span class="ident">required</span>(<span class="bool-val">false</span>))
.<span class="ident">arg</span>(<span class="macro">arg!</span>(<span class="ident">f</span>: <span class="op">-</span><span class="ident">f</span> <span class="string">&quot;Flag&quot;</span>));
<span class="kw">let</span> <span class="ident">r</span> <span class="op">=</span> <span class="ident">cmd</span>.<span class="ident">try_get_matches_from</span>(<span class="macro">vec!</span>[<span class="string">&quot;cmd&quot;</span>, <span class="string">&quot;-c&quot;</span>, <span class="string">&quot;file&quot;</span>, <span class="string">&quot;-f&quot;</span>, <span class="string">&quot;-x&quot;</span>]);
<span class="macro">assert!</span>(<span class="ident">r</span>.<span class="ident">is_ok</span>(), <span class="string">&quot;unexpected error: {:?}&quot;</span>, <span class="ident">r</span>);
<span class="kw">let</span> <span class="ident">m</span> <span class="op">=</span> <span class="ident">r</span>.<span class="ident">unwrap</span>();
<span class="macro">assert_eq!</span>(<span class="ident">m</span>.<span class="ident">value_of</span>(<span class="string">&quot;config&quot;</span>), <span class="prelude-val">Some</span>(<span class="string">&quot;file&quot;</span>));
<span class="macro">assert!</span>(<span class="ident">m</span>.<span class="ident">is_present</span>(<span class="string">&quot;f&quot;</span>));
<span class="macro">assert_eq!</span>(<span class="ident">m</span>.<span class="ident">value_of</span>(<span class="string">&quot;stuff&quot;</span>), <span class="prelude-val">None</span>);</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.args_override_self" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#923-929" title="goto source code">[src]</a></div><a href="#method.args_override_self" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.args_override_self" class="fnname">args_override_self</a>(self, yes: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>Specifies that all arguments override themselves.</p>
<p>This is the equivalent to saying the <code>foo</code> arg using <a href="struct.Arg.html#method.overrides_with"><code>Arg::overrides_with(&quot;foo&quot;)</code></a> for all
defined arguments.</p>
<p><strong>NOTE:</strong> This will not be applied when [<code>Arg::multiple_occurrences(true)</code>].</p>
<p><strong>NOTE:</strong> This choice is propagated to all child subcommands.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.dont_delimit_trailing_values" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#951-957" title="goto source code">[src]</a></div><a href="#method.dont_delimit_trailing_values" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.dont_delimit_trailing_values" class="fnname">dont_delimit_trailing_values</a>(self, yes: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>Disables the automatic delimiting of values after <code>--</code> or when <a href="struct.App.html#method.trailing_var_arg" title="Command::trailing_var_arg"><code>Command::trailing_var_arg</code></a>
was used.</p>
<p><strong>NOTE:</strong> The same thing can be done manually by setting the final positional argument to
<a href="struct.Arg.html#method.use_value_delimiter"><code>Arg::use_value_delimiter(false)</code></a>. Using this setting is safer, because its easier to locate
when making changes.</p>
<p><strong>NOTE:</strong> This choice is propagated to all child subcommands.</p>
<h5 id="examples-25" class="section-header"><a href="#examples-25">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">dont_delimit_trailing_values</span>(<span class="bool-val">true</span>)
.<span class="ident">get_matches</span>();</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.color" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#977-988" title="goto source code">[src]</a></div><a href="#method.color" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.color" class="fnname">color</a>(self, color: <a class="enum" href="enum.ColorChoice.html" title="enum clap::ColorChoice">ColorChoice</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>Sets when to color output.</p>
<p><strong>NOTE:</strong> This choice is propagated to all child subcommands.</p>
<p><strong>NOTE:</strong> Default behaviour is <a href="enum.ColorChoice.html#variant.Auto"><code>ColorChoice::Auto</code></a>.</p>
<h5 id="examples-26" class="section-header"><a href="#examples-26">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">color</span>(<span class="ident">ColorChoice::Never</span>)
.<span class="ident">get_matches</span>();</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.term_width" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#1009-1012" title="goto source code">[src]</a></div><a href="#method.term_width" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.term_width" class="fnname">term_width</a>(self, width: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.usize.html">usize</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>Sets the terminal width at which to wrap help messages.</p>
<p>Using <code>0</code> will ignore terminal widths and use source formatting.</p>
<p>Defaults to current terminal width when <code>wrap_help</code> feature flag is enabled. If the flag
is disabled or it cannot be determined, the default is 100.</p>
<p><strong>NOTE:</strong> This setting applies globally and <em>not</em> on a per-command basis.</p>
<h5 id="examples-27" class="section-header"><a href="#examples-27">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">term_width</span>(<span class="number">80</span>)</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.max_term_width" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#1033-1036" title="goto source code">[src]</a></div><a href="#method.max_term_width" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.max_term_width" class="fnname">max_term_width</a>(self, w: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.usize.html">usize</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>Sets the maximum terminal width at which to wrap help messages.</p>
<p>This only applies when setting the current terminal width. See <a href="struct.App.html#method.term_width" title="Command::term_width"><code>Command::term_width</code></a> for
more details.</p>
<p>Using <code>0</code> will ignore terminal widths and use source formatting.</p>
<p><strong>NOTE:</strong> This setting applies globally and <em>not</em> on a per-command basis.</p>
<h5 id="examples-28" class="section-header"><a href="#examples-28">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">max_term_width</span>(<span class="number">100</span>)</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.disable_version_flag" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#1053-1059" title="goto source code">[src]</a></div><a href="#method.disable_version_flag" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.disable_version_flag" class="fnname">disable_version_flag</a>(self, yes: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>Disables <code>-V</code> and <code>--version</code> flag.</p>
<h5 id="examples-29" class="section-header"><a href="#examples-29">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let</span> <span class="ident">res</span> <span class="op">=</span> <span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">disable_version_flag</span>(<span class="bool-val">true</span>)
.<span class="ident">try_get_matches_from</span>(<span class="macro">vec!</span>[
<span class="string">&quot;myprog&quot;</span>, <span class="string">&quot;-V&quot;</span>
]);
<span class="macro">assert!</span>(<span class="ident">res</span>.<span class="ident">is_err</span>());
<span class="macro">assert_eq!</span>(<span class="ident">res</span>.<span class="ident">unwrap_err</span>().<span class="ident">kind</span>(), <span class="ident">ErrorKind::UnknownArgument</span>);</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.propagate_version" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#1085-1091" title="goto source code">[src]</a></div><a href="#method.propagate_version" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.propagate_version" class="fnname">propagate_version</a>(self, yes: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>Specifies to use the version of the current command for all <a href="struct.App.html#method.subcommand"><code>subcommands</code></a>.</p>
<p>Defaults to <code>false</code>; subcommands have independent version strings from their parents.</p>
<p><strong>Note:</strong> Make sure you apply it as <code>global_setting</code> if you want this setting
to be propagated to subcommands and sub-subcommands!</p>
<p><strong>NOTE:</strong> This choice is propagated to all child subcommands.</p>
<h5 id="examples-30" class="section-header"><a href="#examples-30">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">version</span>(<span class="string">&quot;v1.1&quot;</span>)
.<span class="ident">propagate_version</span>(<span class="bool-val">true</span>)
.<span class="ident">subcommand</span>(<span class="ident">Command::new</span>(<span class="string">&quot;test&quot;</span>))
.<span class="ident">get_matches</span>();
<span class="comment">// running `$ myprog test --version` will display</span>
<span class="comment">// &quot;myprog-test v1.1&quot;</span></code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.next_line_help" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#1106-1112" title="goto source code">[src]</a></div><a href="#method.next_line_help" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.next_line_help" class="fnname">next_line_help</a>(self, yes: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>Places the help string for all arguments and subcommands on the line after them.</p>
<p><strong>NOTE:</strong> This choice is propagated to all child subcommands.</p>
<h5 id="examples-31" class="section-header"><a href="#examples-31">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">next_line_help</span>(<span class="bool-val">true</span>)
.<span class="ident">get_matches</span>();</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.disable_help_flag" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#1131-1137" title="goto source code">[src]</a></div><a href="#method.disable_help_flag" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.disable_help_flag" class="fnname">disable_help_flag</a>(self, yes: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>Disables <code>-h</code> and <code>--help</code> flag.</p>
<p><strong>NOTE:</strong> This choice is propagated to all child subcommands.</p>
<h5 id="examples-32" class="section-header"><a href="#examples-32">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let</span> <span class="ident">res</span> <span class="op">=</span> <span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">disable_help_flag</span>(<span class="bool-val">true</span>)
.<span class="ident">try_get_matches_from</span>(<span class="macro">vec!</span>[
<span class="string">&quot;myprog&quot;</span>, <span class="string">&quot;-h&quot;</span>
]);
<span class="macro">assert!</span>(<span class="ident">res</span>.<span class="ident">is_err</span>());
<span class="macro">assert_eq!</span>(<span class="ident">res</span>.<span class="ident">unwrap_err</span>().<span class="ident">kind</span>(), <span class="ident">ErrorKind::UnknownArgument</span>);</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.disable_help_subcommand" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#1159-1165" title="goto source code">[src]</a></div><a href="#method.disable_help_subcommand" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.disable_help_subcommand" class="fnname">disable_help_subcommand</a>(self, yes: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>Disables the <code>help</code> <a href="struct.App.html#method.subcommand"><code>subcommand</code></a>.</p>
<h5 id="examples-33" class="section-header"><a href="#examples-33">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let</span> <span class="ident">res</span> <span class="op">=</span> <span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">disable_help_subcommand</span>(<span class="bool-val">true</span>)
<span class="comment">// Normally, creating a subcommand causes a `help` subcommand to automatically</span>
<span class="comment">// be generated as well</span>
.<span class="ident">subcommand</span>(<span class="ident">Command::new</span>(<span class="string">&quot;test&quot;</span>))
.<span class="ident">try_get_matches_from</span>(<span class="macro">vec!</span>[
<span class="string">&quot;myprog&quot;</span>, <span class="string">&quot;help&quot;</span>
]);
<span class="macro">assert!</span>(<span class="ident">res</span>.<span class="ident">is_err</span>());
<span class="macro">assert_eq!</span>(<span class="ident">res</span>.<span class="ident">unwrap_err</span>().<span class="ident">kind</span>(), <span class="ident">ErrorKind::UnknownArgument</span>);</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.disable_colored_help" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#1180-1186" title="goto source code">[src]</a></div><a href="#method.disable_colored_help" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.disable_colored_help" class="fnname">disable_colored_help</a>(self, yes: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>Disables colorized help messages.</p>
<p><strong>NOTE:</strong> This choice is propagated to all child subcommands.</p>
<h5 id="examples-34" class="section-header"><a href="#examples-34">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">disable_colored_help</span>(<span class="bool-val">true</span>)
.<span class="ident">get_matches</span>();</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.help_expected" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#1223-1229" title="goto source code">[src]</a></div><a href="#method.help_expected" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.help_expected" class="fnname">help_expected</a>(self, yes: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>Panic if help descriptions are omitted.</p>
<p><strong>NOTE:</strong> When deriving <a href="trait.Parser.html" title="crate::Parser"><code>Parser</code></a>, you could instead check this at
compile-time with <code>#![deny(missing_docs)]</code></p>
<p><strong>NOTE:</strong> This choice is propagated to all child subcommands.</p>
<h5 id="examples-35" class="section-header"><a href="#examples-35">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">help_expected</span>(<span class="bool-val">true</span>)
.<span class="ident">arg</span>(
<span class="ident">Arg::new</span>(<span class="string">&quot;foo&quot;</span>).<span class="ident">help</span>(<span class="string">&quot;It does foo stuff&quot;</span>)
<span class="comment">// As required via `help_expected`, a help message was supplied</span>
)</code></pre></div>
<h5 id="panics-6" class="section-header"><a href="#panics-6">Panics</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="ident">Command::new</span>(<span class="string">&quot;myapp&quot;</span>)
.<span class="ident">help_expected</span>(<span class="bool-val">true</span>)
.<span class="ident">arg</span>(
<span class="ident">Arg::new</span>(<span class="string">&quot;foo&quot;</span>)
<span class="comment">// Someone forgot to put .about(&quot;...&quot;) here</span>
<span class="comment">// Since the setting `help_expected` is activated, this will lead to</span>
<span class="comment">// a panic (if you are in debug mode)</span>
)</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.dont_collapse_args_in_usage" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#1244-1250" title="goto source code">[src]</a></div><a href="#method.dont_collapse_args_in_usage" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.dont_collapse_args_in_usage" class="fnname">dont_collapse_args_in_usage</a>(self, yes: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>Disables the automatic collapsing of positional args into <code>[ARGS]</code> inside the usage string.</p>
<p><strong>NOTE:</strong> This choice is propagated to all child subcommands.</p>
<h5 id="examples-36" class="section-header"><a href="#examples-36">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">dont_collapse_args_in_usage</span>(<span class="bool-val">true</span>)
.<span class="ident">get_matches</span>();</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.hide_possible_values" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#1261-1267" title="goto source code">[src]</a></div><a href="#method.hide_possible_values" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.hide_possible_values" class="fnname">hide_possible_values</a>(self, yes: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>Tells <code>clap</code> <em>not</em> to print possible values when displaying help information.</p>
<p>This can be useful if there are many values, or they are explained elsewhere.</p>
<p>To set this per argument, see
<a href="struct.Arg.html#method.hide_possible_values" title="crate::Arg::hide_possible_values"><code>Arg::hide_possible_values</code></a>.</p>
<p><strong>NOTE:</strong> This choice is propagated to all child subcommands.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.infer_long_args" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#1282-1288" title="goto source code">[src]</a></div><a href="#method.infer_long_args" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.infer_long_args" class="fnname">infer_long_args</a>(self, yes: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>Allow partial matches of long arguments or their <a href="struct.App.html#method.aliases">aliases</a>.</p>
<p>For example, to match an argument named <code>--test</code>, one could use <code>--t</code>, <code>--te</code>, <code>--tes</code>, and
<code>--test</code>.</p>
<p><strong>NOTE:</strong> The match <em>must not</em> be ambiguous at all in order to succeed. i.e. to match
<code>--te</code> to <code>--test</code> there could not also be another argument or alias <code>--temp</code> because both
start with <code>--te</code></p>
<p><strong>NOTE:</strong> This choice is propagated to all child subcommands.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.infer_subcommands" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#1323-1329" title="goto source code">[src]</a></div><a href="#method.infer_subcommands" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.infer_subcommands" class="fnname">infer_subcommands</a>(self, yes: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>Allow partial matches of <a href="struct.App.html#method.subcommand">subcommand</a> names and their <a href="struct.App.html#method.aliases">aliases</a>.</p>
<p>For example, to match a subcommand named <code>test</code>, one could use <code>t</code>, <code>te</code>, <code>tes</code>, and
<code>test</code>.</p>
<p><strong>NOTE:</strong> The match <em>must not</em> be ambiguous at all in order to succeed. i.e. to match <code>te</code>
to <code>test</code> there could not also be a subcommand or alias <code>temp</code> because both start with <code>te</code></p>
<p><strong>CAUTION:</strong> This setting can interfere with <a href="struct.Arg.html#method.index">positional/free arguments</a>, take care when
designing CLIs which allow inferred subcommands and have potential positional/free
arguments whose values could start with the same characters as subcommands. If this is the
case, its recommended to use settings such as <a href="struct.App.html#method.args_conflicts_with_subcommands" title="Command::args_conflicts_with_subcommands"><code>Command::args_conflicts_with_subcommands</code></a> in
conjunction with this setting.</p>
<p><strong>NOTE:</strong> This choice is propagated to all child subcommands.</p>
<h5 id="examples-37" class="section-header"><a href="#examples-37">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let</span> <span class="ident">m</span> <span class="op">=</span> <span class="ident">Command::new</span>(<span class="string">&quot;prog&quot;</span>)
.<span class="ident">infer_subcommands</span>(<span class="bool-val">true</span>)
.<span class="ident">subcommand</span>(<span class="ident">Command::new</span>(<span class="string">&quot;test&quot;</span>))
.<span class="ident">get_matches_from</span>(<span class="macro">vec!</span>[
<span class="string">&quot;prog&quot;</span>, <span class="string">&quot;te&quot;</span>
]);
<span class="macro">assert_eq!</span>(<span class="ident">m</span>.<span class="ident">subcommand_name</span>(), <span class="prelude-val">Some</span>(<span class="string">&quot;test&quot;</span>));</code></pre></div>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-2" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#1335-2180" title="goto source code">[src]</a></div><a href="#impl-2" class="anchor"></a><h3 class="code-header in-band">impl&lt;'help&gt; <a class="struct" href="struct.App.html" title="struct clap::App">App</a>&lt;'help&gt;</h3></div></summary><div class="docblock"><h4 id="command-specific-settings" class="section-header"><a href="#command-specific-settings">Command-specific Settings</a></h4>
<p>These apply only to the current command and are not inherited by subcommands.</p>
</div><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.name" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#1351-1354" title="goto source code">[src]</a></div><a href="#method.name" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.name" class="fnname">name</a>&lt;S:&nbsp;<a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;&gt;(self, name: S) -&gt; Self</h4></div></summary><div class="docblock"><p>(Re)Sets the programs name.</p>
<p>See <a href="struct.App.html#method.new" title="Command::new"><code>Command::new</code></a> for more details.</p>
<h5 id="examples-38" class="section-header"><a href="#examples-38">Examples</a></h5>
<div class='information'><div class='tooltip ignore'></div></div><div class="example-wrap"><pre class="rust rust-example-rendered ignore"><code><span class="kw">let</span> <span class="ident">yaml</span> <span class="op">=</span> <span class="macro">load_yaml!</span>(<span class="string">&quot;cmd.yaml&quot;</span>);
<span class="kw">let</span> <span class="ident">cmd</span> <span class="op">=</span> <span class="ident">Command::from</span>(<span class="ident">yaml</span>)
.<span class="ident">name</span>(<span class="macro">crate_name!</span>());
<span class="comment">// continued logic goes here, such as `cmd.get_matches()` etc.</span></code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.bin_name" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#1377-1380" title="goto source code">[src]</a></div><a href="#method.bin_name" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.bin_name" class="fnname">bin_name</a>&lt;S:&nbsp;<a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;&gt;(self, name: S) -&gt; Self</h4></div></summary><div class="docblock"><p>Overrides the runtime-determined name of the binary for help and error messages.</p>
<p>This should only be used when absolutely necessary, such as when the binary name for your
application is misleading, or perhaps <em>not</em> how the user should invoke your program.</p>
<p><strong>Pro-tip:</strong> When building things such as third party <code>cargo</code>
subcommands, this setting <strong>should</strong> be used!</p>
<p><strong>NOTE:</strong> This <em>does not</em> change or set the name of the binary file on
disk. It only changes what clap thinks the name is for the purposes of
error or help messages.</p>
<h5 id="examples-39" class="section-header"><a href="#examples-39">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="ident">Command::new</span>(<span class="string">&quot;My Program&quot;</span>)
.<span class="ident">bin_name</span>(<span class="string">&quot;my_binary&quot;</span>)</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.author" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#1398-1401" title="goto source code">[src]</a></div><a href="#method.author" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.author" class="fnname">author</a>&lt;S:&nbsp;<a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;&amp;'help <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>&gt;&gt;(self, author: S) -&gt; Self</h4></div></summary><div class="docblock"><p>Sets the author(s) for the help message.</p>
<p><strong>Pro-tip:</strong> Use <code>clap</code>s convenience macro <a href="./macro.crate_authors!.html"><code>crate_authors!</code></a> to
automatically set your applications author(s) to the same thing as your
crate at compile time.</p>
<h5 id="examples-40" class="section-header"><a href="#examples-40">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">author</span>(<span class="string">&quot;Me, me@mymain.com&quot;</span>)</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.about" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#1421-1424" title="goto source code">[src]</a></div><a href="#method.about" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.about" class="fnname">about</a>&lt;O:&nbsp;<a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="enum" href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;'help <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>&gt;&gt;&gt;(self, about: O) -&gt; Self</h4></div></summary><div class="docblock"><p>Sets the programs description for the short help (<code>-h</code>).</p>
<p>If <a href="struct.App.html#method.long_about" title="Command::long_about"><code>Command::long_about</code></a> is not specified, this message will be displayed for <code>--help</code>.</p>
<p><strong>NOTE:</strong> Only <code>Command::about</code> (short format) is used in completion
script generation in order to be concise.</p>
<p>See also <a href="crate::crate_description!"><code>crate_description!</code></a>.</p>
<h5 id="examples-41" class="section-header"><a href="#examples-41">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">about</span>(<span class="string">&quot;Does really amazing things for great people&quot;</span>)</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.long_about" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#1446-1449" title="goto source code">[src]</a></div><a href="#method.long_about" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.long_about" class="fnname">long_about</a>&lt;O:&nbsp;<a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="enum" href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;'help <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>&gt;&gt;&gt;(self, long_about: O) -&gt; Self</h4></div></summary><div class="docblock"><p>Sets the programs description for the long help (<code>--help</code>).</p>
<p>If <a href="struct.App.html#method.about" title="Command::about"><code>Command::about</code></a> is not specified, this message will be displayed for <code>-h</code>.</p>
<p><strong>NOTE:</strong> Only <a href="struct.App.html#method.about" title="Command::about"><code>Command::about</code></a> (short format) is used in completion
script generation in order to be concise.</p>
<h5 id="examples-42" class="section-header"><a href="#examples-42">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">long_about</span>(
<span class="string">&quot;Does really amazing things to great people. Now let&#39;s talk a little
more in depth about how this subcommand really works. It may take about
a few lines of text, but that&#39;s ok!&quot;</span>)</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.after_help" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#1468-1471" title="goto source code">[src]</a></div><a href="#method.after_help" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.after_help" class="fnname">after_help</a>&lt;S:&nbsp;<a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;&amp;'help <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>&gt;&gt;(self, help: S) -&gt; Self</h4></div></summary><div class="docblock"><p>Free-form help text for after auto-generated short help (<code>-h</code>).</p>
<p>This is often used to describe how to use the arguments, caveats to be noted, or license
and contact information.</p>
<p>If <a href="struct.App.html#method.after_long_help" title="Command::after_long_help"><code>Command::after_long_help</code></a> is not specified, this message will be displayed for <code>--help</code>.</p>
<h5 id="examples-43" class="section-header"><a href="#examples-43">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">after_help</span>(<span class="string">&quot;Does really amazing things for great people... but be careful with -R!&quot;</span>)</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.after_long_help" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#1490-1493" title="goto source code">[src]</a></div><a href="#method.after_long_help" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.after_long_help" class="fnname">after_long_help</a>&lt;S:&nbsp;<a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;&amp;'help <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>&gt;&gt;(self, help: S) -&gt; Self</h4></div></summary><div class="docblock"><p>Free-form help text for after auto-generated long help (<code>--help</code>).</p>
<p>This is often used to describe how to use the arguments, caveats to be noted, or license
and contact information.</p>
<p>If <a href="struct.App.html#method.after_help" title="Command::after_help"><code>Command::after_help</code></a> is not specified, this message will be displayed for <code>-h</code>.</p>
<h5 id="examples-44" class="section-header"><a href="#examples-44">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">after_long_help</span>(<span class="string">&quot;Does really amazing things to great people... but be careful with -R, \
like, for real, be careful with this!&quot;</span>)</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.before_help" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#1510-1513" title="goto source code">[src]</a></div><a href="#method.before_help" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.before_help" class="fnname">before_help</a>&lt;S:&nbsp;<a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;&amp;'help <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>&gt;&gt;(self, help: S) -&gt; Self</h4></div></summary><div class="docblock"><p>Free-form help text for before auto-generated short help (<code>-h</code>).</p>
<p>This is often used for header, copyright, or license information.</p>
<p>If <a href="struct.App.html#method.before_long_help" title="Command::before_long_help"><code>Command::before_long_help</code></a> is not specified, this message will be displayed for <code>--help</code>.</p>
<h5 id="examples-45" class="section-header"><a href="#examples-45">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">before_help</span>(<span class="string">&quot;Some info I&#39;d like to appear before the help info&quot;</span>)</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.before_long_help" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#1530-1533" title="goto source code">[src]</a></div><a href="#method.before_long_help" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.before_long_help" class="fnname">before_long_help</a>&lt;S:&nbsp;<a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;&amp;'help <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>&gt;&gt;(self, help: S) -&gt; Self</h4></div></summary><div class="docblock"><p>Free-form help text for before auto-generated long help (<code>--help</code>).</p>
<p>This is often used for header, copyright, or license information.</p>
<p>If <a href="struct.App.html#method.before_help" title="Command::before_help"><code>Command::before_help</code></a> is not specified, this message will be displayed for <code>-h</code>.</p>
<h5 id="examples-46" class="section-header"><a href="#examples-46">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">before_long_help</span>(<span class="string">&quot;Some verbose and long info I&#39;d like to appear before the help info&quot;</span>)</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.version" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#1553-1556" title="goto source code">[src]</a></div><a href="#method.version" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.version" class="fnname">version</a>&lt;S:&nbsp;<a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;&amp;'help <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>&gt;&gt;(self, ver: S) -&gt; Self</h4></div></summary><div class="docblock"><p>Sets the version for the short version (<code>-V</code>) and help messages.</p>
<p>If <a href="struct.App.html#method.long_version" title="Command::long_version"><code>Command::long_version</code></a> is not specified, this message will be displayed for <code>--version</code>.</p>
<p><strong>Pro-tip:</strong> Use <code>clap</code>s convenience macro <a href="./macro.crate_version!.html"><code>crate_version!</code></a> to
automatically set your applications version to the same thing as your
crate at compile time.</p>
<h5 id="examples-47" class="section-header"><a href="#examples-47">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">version</span>(<span class="string">&quot;v0.1.24&quot;</span>)</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.long_version" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#1581-1584" title="goto source code">[src]</a></div><a href="#method.long_version" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.long_version" class="fnname">long_version</a>&lt;S:&nbsp;<a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;&amp;'help <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>&gt;&gt;(self, ver: S) -&gt; Self</h4></div></summary><div class="docblock"><p>Sets the version for the long version (<code>--version</code>) and help messages.</p>
<p>If <a href="struct.App.html#method.version" title="Command::version"><code>Command::version</code></a> is not specified, this message will be displayed for <code>-V</code>.</p>
<p><strong>Pro-tip:</strong> Use <code>clap</code>s convenience macro <a href="./macro.crate_version!.html"><code>crate_version!</code></a> to
automatically set your applications version to the same thing as your
crate at compile time.</p>
<h5 id="examples-48" class="section-header"><a href="#examples-48">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">long_version</span>(
<span class="string">&quot;v0.1.24
commit: abcdef89726d
revision: 123
release: 2
binary: myprog&quot;</span>)</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.override_usage" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#1602-1605" title="goto source code">[src]</a></div><a href="#method.override_usage" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.override_usage" class="fnname">override_usage</a>&lt;S:&nbsp;<a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;&amp;'help <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>&gt;&gt;(self, usage: S) -&gt; Self</h4></div></summary><div class="docblock"><p>Overrides the <code>clap</code> generated usage string for help and error messages.</p>
<p><strong>NOTE:</strong> Using this setting disables <code>clap</code>s “context-aware” usage
strings. After this setting is set, this will be <em>the only</em> usage string
displayed to the user!</p>
<h5 id="examples-49" class="section-header"><a href="#examples-49">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">override_usage</span>(<span class="string">&quot;myapp [-clDas] &lt;some_file&gt;&quot;</span>)</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.override_help" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#1639-1642" title="goto source code">[src]</a></div><a href="#method.override_help" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.override_help" class="fnname">override_help</a>&lt;S:&nbsp;<a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;&amp;'help <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>&gt;&gt;(self, help: S) -&gt; Self</h4></div></summary><div class="docblock"><p>Overrides the <code>clap</code> generated help message (both <code>-h</code> and <code>--help</code>).</p>
<p>This should only be used when the auto-generated message does not suffice.</p>
<p><strong>NOTE:</strong> This <strong>only</strong> replaces the help message for the current
command, meaning if you are using subcommands, those help messages will
still be auto-generated unless you specify a <a href="struct.App.html#method.override_help" title="Command::override_help"><code>Command::override_help</code></a> for
them as well.</p>
<h5 id="examples-50" class="section-header"><a href="#examples-50">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="ident">Command::new</span>(<span class="string">&quot;myapp&quot;</span>)
.<span class="ident">override_help</span>(<span class="string">&quot;myapp v1.0\n\
Does awesome things\n\
(C) me@mail.com\n\n\
USAGE: myapp &lt;opts&gt; &lt;command&gt;\n\n\
Options:\n\
-h, --help Display this message\n\
-V, --version Display version info\n\
-s &lt;stuff&gt; Do something with stuff\n\
-v Be verbose\n\n\
Commands:\n\
help Print this message\n\
work Do some work&quot;</span>)</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.help_template" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#1688-1691" title="goto source code">[src]</a></div><a href="#method.help_template" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.help_template" class="fnname">help_template</a>&lt;S:&nbsp;<a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;&amp;'help <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>&gt;&gt;(self, s: S) -&gt; Self</h4></div></summary><div class="docblock"><p>Sets the help template to be used, overriding the default format.</p>
<p><strong>NOTE:</strong> The template system is by design very simple. Therefore, the
tags have to be written in the lowercase and without spacing.</p>
<p>Tags are given inside curly brackets.</p>
<p>Valid tags are:</p>
<ul>
<li><code>{bin}</code> - Binary name.</li>
<li><code>{version}</code> - Version number.</li>
<li><code>{author}</code> - Author information.</li>
<li><code>{author-with-newline}</code> - Author followed by <code>\n</code>.</li>
<li><code>{author-section}</code> - Author preceded and followed by <code>\n</code>.</li>
<li><code>{about}</code> - General description (from <a href="struct.App.html#method.about" title="Command::about"><code>Command::about</code></a> or
<a href="struct.App.html#method.long_about" title="Command::long_about"><code>Command::long_about</code></a>).</li>
<li><code>{about-with-newline}</code> - About followed by <code>\n</code>.</li>
<li><code>{about-section}</code> - About preceded and followed by \n.</li>
<li><code>{usage-heading}</code> - Automatically generated usage heading.</li>
<li><code>{usage}</code> - Automatically generated or given usage string.</li>
<li><code>{all-args}</code> - Help for all arguments (options, flags, positional
arguments, and subcommands) including titles.</li>
<li><code>{options}</code> - Help for options.</li>
<li><code>{positionals}</code> - Help for positional arguments.</li>
<li><code>{subcommands}</code> - Help for subcommands.</li>
<li><code>{after-help}</code> - Help from <a href="struct.App.html#method.after_help"><code>App::after_help</code></a> or <a href="struct.App.html#method.after_long_help" title="Command::after_long_help"><code>Command::after_long_help</code></a>.</li>
<li><code>{before-help}</code> - Help from <a href="struct.App.html#method.before_help"><code>App::before_help</code></a> or <a href="struct.App.html#method.before_long_help" title="Command::before_long_help"><code>Command::before_long_help</code></a>.</li>
</ul>
<h5 id="examples-51" class="section-header"><a href="#examples-51">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">version</span>(<span class="string">&quot;1.0&quot;</span>)
.<span class="ident">help_template</span>(<span class="string">&quot;{bin} ({version}) - {usage}&quot;</span>)</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.setting" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#1717-1723" title="goto source code">[src]</a></div><a href="#method.setting" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.setting" class="fnname">setting</a>&lt;F&gt;(self, setting: F) -&gt; Self <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;AppFlags&gt;,&nbsp;</span></h4></div></summary><div class="docblock"><p>Apply a setting for the current command or subcommand.</p>
<p>See <a href="struct.App.html#method.global_setting" title="Command::global_setting"><code>Command::global_setting</code></a> to apply a setting to this command and all subcommands.</p>
<p>See <a href="enum.AppSettings.html" title="AppSettings"><code>AppSettings</code></a> for a full list of possibilities and examples.</p>
<h5 id="examples-52" class="section-header"><a href="#examples-52">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">setting</span>(<span class="ident">AppSettings::SubcommandRequired</span>)
.<span class="ident">setting</span>(<span class="ident">AppSettings::AllowLeadingHyphen</span>)</code></pre></div>
<p>or</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">setting</span>(<span class="ident">AppSettings::SubcommandRequired</span> <span class="op">|</span> <span class="ident">AppSettings::AllowLeadingHyphen</span>)</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.unset_setting" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#1747-1753" title="goto source code">[src]</a></div><a href="#method.unset_setting" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.unset_setting" class="fnname">unset_setting</a>&lt;F&gt;(self, setting: F) -&gt; Self <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;AppFlags&gt;,&nbsp;</span></h4></div></summary><div class="docblock"><p>Remove a setting for the current command or subcommand.</p>
<p>See <a href="enum.AppSettings.html" title="AppSettings"><code>AppSettings</code></a> for a full list of possibilities and examples.</p>
<h5 id="examples-53" class="section-header"><a href="#examples-53">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">unset_setting</span>(<span class="ident">AppSettings::SubcommandRequired</span>)
.<span class="ident">setting</span>(<span class="ident">AppSettings::AllowLeadingHyphen</span>)</code></pre></div>
<p>or</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">unset_setting</span>(<span class="ident">AppSettings::SubcommandRequired</span> <span class="op">|</span> <span class="ident">AppSettings::AllowLeadingHyphen</span>)</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.global_setting" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#1771-1775" title="goto source code">[src]</a></div><a href="#method.global_setting" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.global_setting" class="fnname">global_setting</a>(self, setting: <a class="enum" href="enum.AppSettings.html" title="enum clap::AppSettings">AppSettings</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>Apply a setting for the current command and all subcommands.</p>
<p>See <a href="struct.App.html#method.setting" title="Command::setting"><code>Command::setting</code></a> to apply a setting only to this command.</p>
<p>See <a href="enum.AppSettings.html" title="AppSettings"><code>AppSettings</code></a> for a full list of possibilities and examples.</p>
<h5 id="examples-54" class="section-header"><a href="#examples-54">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">global_setting</span>(<span class="ident">AppSettings::AllowNegativeNumbers</span>)</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.unset_global_setting" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#1792-1796" title="goto source code">[src]</a></div><a href="#method.unset_global_setting" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.unset_global_setting" class="fnname">unset_global_setting</a>(self, setting: <a class="enum" href="enum.AppSettings.html" title="enum clap::AppSettings">AppSettings</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>Remove a setting and stop propagating down to subcommands.</p>
<p>See <a href="enum.AppSettings.html" title="AppSettings"><code>AppSettings</code></a> for a full list of possibilities and examples.</p>
<h5 id="examples-55" class="section-header"><a href="#examples-55">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">unset_global_setting</span>(<span class="ident">AppSettings::AllowNegativeNumbers</span>)</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.help_heading" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#1802-1807" title="goto source code">[src]</a></div><a href="#method.help_heading" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.help_heading" class="fnname">help_heading</a>&lt;O&gt;(self, heading: O) -&gt; Self <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;O: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="enum" href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;'help <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>&gt;&gt;,&nbsp;</span></h4></div><div class="item-info"><div class="stab deprecated"><span class="emoji">👎</span> Deprecated since 3.1.0: <p>Replaced with <code>App::next_help_heading</code></p>
</div></div></summary><div class="docblock"><p>Deprecated, replaced with <a href="struct.App.html#method.next_help_heading" title="Command::next_help_heading"><code>Command::next_help_heading</code></a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.next_help_heading" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#1822-1828" title="goto source code">[src]</a></div><a href="#method.next_help_heading" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.next_help_heading" class="fnname">next_help_heading</a>&lt;O&gt;(self, heading: O) -&gt; Self <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;O: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="enum" href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;'help <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>&gt;&gt;,&nbsp;</span></h4></div></summary><div class="docblock"><p>Set the default section heading for future args.</p>
<p>This will be used for any arg that hasnt had <a href="struct.Arg.html#method.help_heading"><code>Arg::help_heading</code></a> called.</p>
<p>This is useful if the default <code>OPTIONS</code> or <code>ARGS</code> headings are
not specific enough for ones use case.</p>
<p>For subcommands, see <a href="struct.App.html#method.subcommand_help_heading" title="Command::subcommand_help_heading"><code>Command::subcommand_help_heading</code></a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.next_display_order" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#1835-1838" title="goto source code">[src]</a></div><a href="#method.next_display_order" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.next_display_order" class="fnname">next_display_order</a>(self, disp_ord: impl <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="enum" href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.usize.html">usize</a>&gt;&gt;) -&gt; Self</h4></div></summary><div class="docblock"><p>Change the starting value for assigning future display orders for ags.</p>
<p>This will be used for any arg that hasnt had <a href="struct.Arg.html#method.display_order" title="Arg::display_order"><code>Arg::display_order</code></a> called.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.arg_required_else_help" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#1966-1972" title="goto source code">[src]</a></div><a href="#method.arg_required_else_help" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.arg_required_else_help" class="fnname">arg_required_else_help</a>(self, yes: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>Exit gracefully if no arguments are present (e.g. <code>$ myprog</code>).</p>
<p><strong>NOTE:</strong> <a href="struct.App.html#method.subcommand"><code>subcommands</code></a> count as arguments</p>
<h5 id="examples-56" class="section-header"><a href="#examples-56">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">arg_required_else_help</span>(<span class="bool-val">true</span>);</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.allow_hyphen_values" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#2000-2006" title="goto source code">[src]</a></div><a href="#method.allow_hyphen_values" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.allow_hyphen_values" class="fnname">allow_hyphen_values</a>(self, yes: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>Specifies that leading hyphens are allowed in all argument <em>values</em> (e.g. <code>-10</code>).</p>
<p>Otherwise they will be parsed as another flag or option. See also
<a href="struct.App.html#method.allow_negative_numbers" title="Command::allow_negative_numbers"><code>Command::allow_negative_numbers</code></a>.</p>
<p><strong>NOTE:</strong> Use this setting with caution as it silences certain circumstances which would
otherwise be an error (such as accidentally forgetting to specify a value for leading
option). It is preferred to set this on a per argument basis, via <a href="struct.Arg.html#method.allow_hyphen_values"><code>Arg::allow_hyphen_values</code></a>.</p>
<h5 id="examples-57" class="section-header"><a href="#examples-57">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="comment">// Imagine you needed to represent negative numbers as well, such as -10</span>
<span class="kw">let</span> <span class="ident">m</span> <span class="op">=</span> <span class="ident">Command::new</span>(<span class="string">&quot;nums&quot;</span>)
.<span class="ident">allow_hyphen_values</span>(<span class="bool-val">true</span>)
.<span class="ident">arg</span>(<span class="ident">Arg::new</span>(<span class="string">&quot;neg&quot;</span>))
.<span class="ident">get_matches_from</span>(<span class="macro">vec!</span>[
<span class="string">&quot;nums&quot;</span>, <span class="string">&quot;-20&quot;</span>
]);
<span class="macro">assert_eq!</span>(<span class="ident">m</span>.<span class="ident">value_of</span>(<span class="string">&quot;neg&quot;</span>), <span class="prelude-val">Some</span>(<span class="string">&quot;-20&quot;</span>));</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.allow_negative_numbers" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#2028-2034" title="goto source code">[src]</a></div><a href="#method.allow_negative_numbers" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.allow_negative_numbers" class="fnname">allow_negative_numbers</a>(self, yes: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>Allows negative numbers to pass as values.</p>
<p>This is similar to <a href="struct.App.html#method.allow_hyphen_values" title="Command::allow_hyphen_values"><code>Command::allow_hyphen_values</code></a> except that it only allows numbers,
all other undefined leading hyphens will fail to parse.</p>
<h5 id="examples-58" class="section-header"><a href="#examples-58">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let</span> <span class="ident">res</span> <span class="op">=</span> <span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">allow_negative_numbers</span>(<span class="bool-val">true</span>)
.<span class="ident">arg</span>(<span class="ident">Arg::new</span>(<span class="string">&quot;num&quot;</span>))
.<span class="ident">try_get_matches_from</span>(<span class="macro">vec!</span>[
<span class="string">&quot;myprog&quot;</span>, <span class="string">&quot;-20&quot;</span>
]);
<span class="macro">assert!</span>(<span class="ident">res</span>.<span class="ident">is_ok</span>());
<span class="kw">let</span> <span class="ident">m</span> <span class="op">=</span> <span class="ident">res</span>.<span class="ident">unwrap</span>();
<span class="macro">assert_eq!</span>(<span class="ident">m</span>.<span class="ident">value_of</span>(<span class="string">&quot;num&quot;</span>).<span class="ident">unwrap</span>(), <span class="string">&quot;-20&quot;</span>);</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.trailing_var_arg" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#2057-2063" title="goto source code">[src]</a></div><a href="#method.trailing_var_arg" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.trailing_var_arg" class="fnname">trailing_var_arg</a>(self, yes: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>Specifies that the final positional argument is a “VarArg” and that <code>clap</code> should not
attempt to parse any further args.</p>
<p>The values of the trailing positional argument will contain all args from itself on.</p>
<p><strong>NOTE:</strong> The final positional argument <strong>must</strong> have <a href="struct.Arg.html#method.multiple_values"><code>Arg::multiple_values(true)</code></a> or the usage
string equivalent.</p>
<h5 id="examples-59" class="section-header"><a href="#examples-59">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let</span> <span class="ident">m</span> <span class="op">=</span> <span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">trailing_var_arg</span>(<span class="bool-val">true</span>)
.<span class="ident">arg</span>(<span class="macro">arg!</span>(<span class="op">&lt;</span><span class="ident">cmd</span><span class="op">&gt;</span> ... <span class="string">&quot;commands to run&quot;</span>))
.<span class="ident">get_matches_from</span>(<span class="macro">vec!</span>[<span class="string">&quot;myprog&quot;</span>, <span class="string">&quot;arg1&quot;</span>, <span class="string">&quot;-r&quot;</span>, <span class="string">&quot;val1&quot;</span>]);
<span class="kw">let</span> <span class="ident">trail</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="kw-2">&amp;</span><span class="ident">str</span><span class="op">&gt;</span> <span class="op">=</span> <span class="ident">m</span>.<span class="ident">values_of</span>(<span class="string">&quot;cmd&quot;</span>).<span class="ident">unwrap</span>().<span class="ident">collect</span>();
<span class="macro">assert_eq!</span>(<span class="ident">trail</span>, [<span class="string">&quot;arg1&quot;</span>, <span class="string">&quot;-r&quot;</span>, <span class="string">&quot;val1&quot;</span>]);</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.allow_missing_positional" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#2173-2179" title="goto source code">[src]</a></div><a href="#method.allow_missing_positional" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.allow_missing_positional" class="fnname">allow_missing_positional</a>(self, yes: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>Allows one to implement two styles of CLIs where positionals can be used out of order.</p>
<p>The first example is a CLI where the second to last positional argument is optional, but
the final positional argument is required. Such as <code>$ prog [optional] &lt;required&gt;</code> where one
of the two following usages is allowed:</p>
<ul>
<li><code>$ prog [optional] &lt;required&gt;</code></li>
<li><code>$ prog &lt;required&gt;</code></li>
</ul>
<p>This would otherwise not be allowed. This is useful when <code>[optional]</code> has a default value.</p>
<p><strong>Note:</strong> when using this style of “missing positionals” the final positional <em>must</em> be
<a href="struct.Arg.html#method.required">required</a> if <code>--</code> will not be used to skip to the final positional argument.</p>
<p><strong>Note:</strong> This style also only allows a single positional argument to be “skipped” without
the use of <code>--</code>. To skip more than one, see the second example.</p>
<p>The second example is when one wants to skip multiple optional positional arguments, and use
of the <code>--</code> operator is OK (but not required if all arguments will be specified anyways).</p>
<p>For example, imagine a CLI which has three positional arguments <code>[foo] [bar] [baz]...</code> where
<code>baz</code> accepts multiple values (similar to man <code>ARGS...</code> style training arguments).</p>
<p>With this setting the following invocations are posisble:</p>
<ul>
<li><code>$ prog foo bar baz1 baz2 baz3</code></li>
<li><code>$ prog foo -- baz1 baz2 baz3</code></li>
<li><code>$ prog -- baz1 baz2 baz3</code></li>
</ul>
<h5 id="examples-60" class="section-header"><a href="#examples-60">Examples</a></h5>
<p>Style number one from above:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="comment">// Assume there is an external subcommand named &quot;subcmd&quot;</span>
<span class="kw">let</span> <span class="ident">m</span> <span class="op">=</span> <span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">allow_missing_positional</span>(<span class="bool-val">true</span>)
.<span class="ident">arg</span>(<span class="ident">Arg::new</span>(<span class="string">&quot;arg1&quot;</span>))
.<span class="ident">arg</span>(<span class="ident">Arg::new</span>(<span class="string">&quot;arg2&quot;</span>)
.<span class="ident">required</span>(<span class="bool-val">true</span>))
.<span class="ident">get_matches_from</span>(<span class="macro">vec!</span>[
<span class="string">&quot;prog&quot;</span>, <span class="string">&quot;other&quot;</span>
]);
<span class="macro">assert_eq!</span>(<span class="ident">m</span>.<span class="ident">value_of</span>(<span class="string">&quot;arg1&quot;</span>), <span class="prelude-val">None</span>);
<span class="macro">assert_eq!</span>(<span class="ident">m</span>.<span class="ident">value_of</span>(<span class="string">&quot;arg2&quot;</span>), <span class="prelude-val">Some</span>(<span class="string">&quot;other&quot;</span>));</code></pre></div>
<p>Now the same example, but using a default value for the first optional positional argument</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="comment">// Assume there is an external subcommand named &quot;subcmd&quot;</span>
<span class="kw">let</span> <span class="ident">m</span> <span class="op">=</span> <span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">allow_missing_positional</span>(<span class="bool-val">true</span>)
.<span class="ident">arg</span>(<span class="ident">Arg::new</span>(<span class="string">&quot;arg1&quot;</span>)
.<span class="ident">default_value</span>(<span class="string">&quot;something&quot;</span>))
.<span class="ident">arg</span>(<span class="ident">Arg::new</span>(<span class="string">&quot;arg2&quot;</span>)
.<span class="ident">required</span>(<span class="bool-val">true</span>))
.<span class="ident">get_matches_from</span>(<span class="macro">vec!</span>[
<span class="string">&quot;prog&quot;</span>, <span class="string">&quot;other&quot;</span>
]);
<span class="macro">assert_eq!</span>(<span class="ident">m</span>.<span class="ident">value_of</span>(<span class="string">&quot;arg1&quot;</span>), <span class="prelude-val">Some</span>(<span class="string">&quot;something&quot;</span>));
<span class="macro">assert_eq!</span>(<span class="ident">m</span>.<span class="ident">value_of</span>(<span class="string">&quot;arg2&quot;</span>), <span class="prelude-val">Some</span>(<span class="string">&quot;other&quot;</span>));</code></pre></div>
<p>Style number two from above:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="comment">// Assume there is an external subcommand named &quot;subcmd&quot;</span>
<span class="kw">let</span> <span class="ident">m</span> <span class="op">=</span> <span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">allow_missing_positional</span>(<span class="bool-val">true</span>)
.<span class="ident">arg</span>(<span class="ident">Arg::new</span>(<span class="string">&quot;foo&quot;</span>))
.<span class="ident">arg</span>(<span class="ident">Arg::new</span>(<span class="string">&quot;bar&quot;</span>))
.<span class="ident">arg</span>(<span class="ident">Arg::new</span>(<span class="string">&quot;baz&quot;</span>).<span class="ident">takes_value</span>(<span class="bool-val">true</span>).<span class="ident">multiple_values</span>(<span class="bool-val">true</span>))
.<span class="ident">get_matches_from</span>(<span class="macro">vec!</span>[
<span class="string">&quot;prog&quot;</span>, <span class="string">&quot;foo&quot;</span>, <span class="string">&quot;bar&quot;</span>, <span class="string">&quot;baz1&quot;</span>, <span class="string">&quot;baz2&quot;</span>, <span class="string">&quot;baz3&quot;</span>
]);
<span class="macro">assert_eq!</span>(<span class="ident">m</span>.<span class="ident">value_of</span>(<span class="string">&quot;foo&quot;</span>), <span class="prelude-val">Some</span>(<span class="string">&quot;foo&quot;</span>));
<span class="macro">assert_eq!</span>(<span class="ident">m</span>.<span class="ident">value_of</span>(<span class="string">&quot;bar&quot;</span>), <span class="prelude-val">Some</span>(<span class="string">&quot;bar&quot;</span>));
<span class="macro">assert_eq!</span>(<span class="ident">m</span>.<span class="ident">values_of</span>(<span class="string">&quot;baz&quot;</span>).<span class="ident">unwrap</span>().<span class="ident">collect</span>::<span class="op">&lt;</span><span class="ident">Vec</span><span class="op">&lt;</span><span class="kw">_</span><span class="op">&gt;</span><span class="op">&gt;</span>(), <span class="kw-2">&amp;</span>[<span class="string">&quot;baz1&quot;</span>, <span class="string">&quot;baz2&quot;</span>, <span class="string">&quot;baz3&quot;</span>]);</code></pre></div>
<p>Now nofice if we dont specify <code>foo</code> or <code>baz</code> but use the <code>--</code> operator.</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="comment">// Assume there is an external subcommand named &quot;subcmd&quot;</span>
<span class="kw">let</span> <span class="ident">m</span> <span class="op">=</span> <span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">allow_missing_positional</span>(<span class="bool-val">true</span>)
.<span class="ident">arg</span>(<span class="ident">Arg::new</span>(<span class="string">&quot;foo&quot;</span>))
.<span class="ident">arg</span>(<span class="ident">Arg::new</span>(<span class="string">&quot;bar&quot;</span>))
.<span class="ident">arg</span>(<span class="ident">Arg::new</span>(<span class="string">&quot;baz&quot;</span>).<span class="ident">takes_value</span>(<span class="bool-val">true</span>).<span class="ident">multiple_values</span>(<span class="bool-val">true</span>))
.<span class="ident">get_matches_from</span>(<span class="macro">vec!</span>[
<span class="string">&quot;prog&quot;</span>, <span class="string">&quot;--&quot;</span>, <span class="string">&quot;baz1&quot;</span>, <span class="string">&quot;baz2&quot;</span>, <span class="string">&quot;baz3&quot;</span>
]);
<span class="macro">assert_eq!</span>(<span class="ident">m</span>.<span class="ident">value_of</span>(<span class="string">&quot;foo&quot;</span>), <span class="prelude-val">None</span>);
<span class="macro">assert_eq!</span>(<span class="ident">m</span>.<span class="ident">value_of</span>(<span class="string">&quot;bar&quot;</span>), <span class="prelude-val">None</span>);
<span class="macro">assert_eq!</span>(<span class="ident">m</span>.<span class="ident">values_of</span>(<span class="string">&quot;baz&quot;</span>).<span class="ident">unwrap</span>().<span class="ident">collect</span>::<span class="op">&lt;</span><span class="ident">Vec</span><span class="op">&lt;</span><span class="kw">_</span><span class="op">&gt;</span><span class="op">&gt;</span>(), <span class="kw-2">&amp;</span>[<span class="string">&quot;baz1&quot;</span>, <span class="string">&quot;baz2&quot;</span>, <span class="string">&quot;baz3&quot;</span>]);</code></pre></div>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-3" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#2183-3161" title="goto source code">[src]</a></div><a href="#impl-3" class="anchor"></a><h3 class="code-header in-band">impl&lt;'help&gt; <a class="struct" href="struct.App.html" title="struct clap::App">App</a>&lt;'help&gt;</h3></div></summary><div class="docblock"><h4 id="subcommand-specific-settings" class="section-header"><a href="#subcommand-specific-settings">Subcommand-specific Settings</a></h4></div><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.short_flag" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#2209-2212" title="goto source code">[src]</a></div><a href="#method.short_flag" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.short_flag" class="fnname">short_flag</a>(self, short: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.char.html">char</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>Sets the short version of the subcommand flag without the preceding <code>-</code>.</p>
<p>Allows the subcommand to be used as if it were an <a href="struct.Arg.html#method.short"><code>Arg::short</code></a>.</p>
<h5 id="examples-61" class="section-header"><a href="#examples-61">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let</span> <span class="ident">matches</span> <span class="op">=</span> <span class="ident">Command::new</span>(<span class="string">&quot;pacman&quot;</span>)
.<span class="ident">subcommand</span>(
<span class="ident">Command::new</span>(<span class="string">&quot;sync&quot;</span>).<span class="ident">short_flag</span>(<span class="string">&#39;S&#39;</span>).<span class="ident">arg</span>(
<span class="ident">Arg::new</span>(<span class="string">&quot;search&quot;</span>)
.<span class="ident">short</span>(<span class="string">&#39;s&#39;</span>)
.<span class="ident">long</span>(<span class="string">&quot;search&quot;</span>)
.<span class="ident">help</span>(<span class="string">&quot;search remote repositories for matching strings&quot;</span>),
),
)
.<span class="ident">get_matches_from</span>(<span class="macro">vec!</span>[<span class="string">&quot;pacman&quot;</span>, <span class="string">&quot;-Ss&quot;</span>]);
<span class="macro">assert_eq!</span>(<span class="ident">matches</span>.<span class="ident">subcommand_name</span>().<span class="ident">unwrap</span>(), <span class="string">&quot;sync&quot;</span>);
<span class="kw">let</span> <span class="ident">sync_matches</span> <span class="op">=</span> <span class="ident">matches</span>.<span class="ident">subcommand_matches</span>(<span class="string">&quot;sync&quot;</span>).<span class="ident">unwrap</span>();
<span class="macro">assert!</span>(<span class="ident">sync_matches</span>.<span class="ident">is_present</span>(<span class="string">&quot;search&quot;</span>));</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.long_flag" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#2246-2249" title="goto source code">[src]</a></div><a href="#method.long_flag" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.long_flag" class="fnname">long_flag</a>(self, long: &amp;'help <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>Sets the long version of the subcommand flag without the preceding <code>--</code>.</p>
<p>Allows the subcommand to be used as if it were an <a href="struct.Arg.html#method.long"><code>Arg::long</code></a>.</p>
<p><strong>NOTE:</strong> Any leading <code>-</code> characters will be stripped.</p>
<h5 id="examples-62" class="section-header"><a href="#examples-62">Examples</a></h5>
<p>To set <code>long_flag</code> use a word containing valid UTF-8 codepoints. If you supply a double leading
<code>--</code> such as <code>--sync</code> they will be stripped. Hyphens in the middle of the word; however,
will <em>not</em> be stripped (i.e. <code>sync-file</code> is allowed).</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let</span> <span class="ident">matches</span> <span class="op">=</span> <span class="ident">Command::new</span>(<span class="string">&quot;pacman&quot;</span>)
.<span class="ident">subcommand</span>(
<span class="ident">Command::new</span>(<span class="string">&quot;sync&quot;</span>).<span class="ident">long_flag</span>(<span class="string">&quot;sync&quot;</span>).<span class="ident">arg</span>(
<span class="ident">Arg::new</span>(<span class="string">&quot;search&quot;</span>)
.<span class="ident">short</span>(<span class="string">&#39;s&#39;</span>)
.<span class="ident">long</span>(<span class="string">&quot;search&quot;</span>)
.<span class="ident">help</span>(<span class="string">&quot;search remote repositories for matching strings&quot;</span>),
),
)
.<span class="ident">get_matches_from</span>(<span class="macro">vec!</span>[<span class="string">&quot;pacman&quot;</span>, <span class="string">&quot;--sync&quot;</span>, <span class="string">&quot;--search&quot;</span>]);
<span class="macro">assert_eq!</span>(<span class="ident">matches</span>.<span class="ident">subcommand_name</span>().<span class="ident">unwrap</span>(), <span class="string">&quot;sync&quot;</span>);
<span class="kw">let</span> <span class="ident">sync_matches</span> <span class="op">=</span> <span class="ident">matches</span>.<span class="ident">subcommand_matches</span>(<span class="string">&quot;sync&quot;</span>).<span class="ident">unwrap</span>();
<span class="macro">assert!</span>(<span class="ident">sync_matches</span>.<span class="ident">is_present</span>(<span class="string">&quot;search&quot;</span>));</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.alias" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#2277-2280" title="goto source code">[src]</a></div><a href="#method.alias" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.alias" class="fnname">alias</a>&lt;S:&nbsp;<a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;&amp;'help <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>&gt;&gt;(self, name: S) -&gt; Self</h4></div></summary><div class="docblock"><p>Sets a hidden alias to this subcommand.</p>
<p>This allows the subcommand to be accessed via <em>either</em> the original name, or this given
alias. This is more efficient and easier than creating multiple hidden subcommands as one
only needs to check for the existence of this command, and not all aliased variants.</p>
<p><strong>NOTE:</strong> Aliases defined with this method are <em>hidden</em> from the help
message. If youre looking for aliases that will be displayed in the help
message, see <a href="struct.App.html#method.visible_alias" title="Command::visible_alias"><code>Command::visible_alias</code></a>.</p>
<p><strong>NOTE:</strong> When using aliases and checking for the existence of a
particular subcommand within an <a href="struct.ArgMatches.html" title="ArgMatches"><code>ArgMatches</code></a> struct, one only needs to
search for the original name and not all aliases.</p>
<h5 id="examples-63" class="section-header"><a href="#examples-63">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let</span> <span class="ident">m</span> <span class="op">=</span> <span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">subcommand</span>(<span class="ident">Command::new</span>(<span class="string">&quot;test&quot;</span>)
.<span class="ident">alias</span>(<span class="string">&quot;do-stuff&quot;</span>))
.<span class="ident">get_matches_from</span>(<span class="macro">vec!</span>[<span class="string">&quot;myprog&quot;</span>, <span class="string">&quot;do-stuff&quot;</span>]);
<span class="macro">assert_eq!</span>(<span class="ident">m</span>.<span class="ident">subcommand_name</span>(), <span class="prelude-val">Some</span>(<span class="string">&quot;test&quot;</span>));</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.short_flag_alias" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#2299-2303" title="goto source code">[src]</a></div><a href="#method.short_flag_alias" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.short_flag_alias" class="fnname">short_flag_alias</a>(self, name: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.char.html">char</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>Add an alias, which functions as “hidden” short flag subcommand</p>
<p>This will automatically dispatch as if this subcommand was used. This is more efficient,
and easier than creating multiple hidden subcommands as one only needs to check for the
existence of this command, and not all variants.</p>
<h5 id="examples-64" class="section-header"><a href="#examples-64">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let</span> <span class="ident">m</span> <span class="op">=</span> <span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">subcommand</span>(<span class="ident">Command::new</span>(<span class="string">&quot;test&quot;</span>).<span class="ident">short_flag</span>(<span class="string">&#39;t&#39;</span>)
.<span class="ident">short_flag_alias</span>(<span class="string">&#39;d&#39;</span>))
.<span class="ident">get_matches_from</span>(<span class="macro">vec!</span>[<span class="string">&quot;myprog&quot;</span>, <span class="string">&quot;-d&quot;</span>]);
<span class="macro">assert_eq!</span>(<span class="ident">m</span>.<span class="ident">subcommand_name</span>(), <span class="prelude-val">Some</span>(<span class="string">&quot;test&quot;</span>));</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.long_flag_alias" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#2322-2325" title="goto source code">[src]</a></div><a href="#method.long_flag_alias" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.long_flag_alias" class="fnname">long_flag_alias</a>(self, name: &amp;'help <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>Add an alias, which functions as a “hidden” long flag subcommand.</p>
<p>This will automatically dispatch as if this subcommand was used. This is more efficient,
and easier than creating multiple hidden subcommands as one only needs to check for the
existence of this command, and not all variants.</p>
<h5 id="examples-65" class="section-header"><a href="#examples-65">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let</span> <span class="ident">m</span> <span class="op">=</span> <span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">subcommand</span>(<span class="ident">Command::new</span>(<span class="string">&quot;test&quot;</span>).<span class="ident">long_flag</span>(<span class="string">&quot;test&quot;</span>)
.<span class="ident">long_flag_alias</span>(<span class="string">&quot;testing&quot;</span>))
.<span class="ident">get_matches_from</span>(<span class="macro">vec!</span>[<span class="string">&quot;myprog&quot;</span>, <span class="string">&quot;--testing&quot;</span>]);
<span class="macro">assert_eq!</span>(<span class="ident">m</span>.<span class="ident">subcommand_name</span>(), <span class="prelude-val">Some</span>(<span class="string">&quot;test&quot;</span>));</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.aliases" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#2357-2360" title="goto source code">[src]</a></div><a href="#method.aliases" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.aliases" class="fnname">aliases</a>(self, names: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.slice.html">&amp;[</a>&amp;'help <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a><a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.slice.html">]</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>Sets multiple hidden aliases to this subcommand.</p>
<p>This allows the subcommand to be accessed via <em>either</em> the original name or any of the
given aliases. This is more efficient, and easier than creating multiple hidden subcommands
as one only needs to check for the existence of this command and not all aliased variants.</p>
<p><strong>NOTE:</strong> Aliases defined with this method are <em>hidden</em> from the help
message. If looking for aliases that will be displayed in the help
message, see <a href="struct.App.html#method.visible_aliases" title="Command::visible_aliases"><code>Command::visible_aliases</code></a>.</p>
<p><strong>NOTE:</strong> When using aliases and checking for the existence of a
particular subcommand within an <a href="struct.ArgMatches.html" title="ArgMatches"><code>ArgMatches</code></a> struct, one only needs to
search for the original name and not all aliases.</p>
<h5 id="examples-66" class="section-header"><a href="#examples-66">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let</span> <span class="ident">m</span> <span class="op">=</span> <span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">subcommand</span>(<span class="ident">Command::new</span>(<span class="string">&quot;test&quot;</span>)
.<span class="ident">aliases</span>(<span class="kw-2">&amp;</span>[<span class="string">&quot;do-stuff&quot;</span>, <span class="string">&quot;do-tests&quot;</span>, <span class="string">&quot;tests&quot;</span>]))
.<span class="ident">arg</span>(<span class="ident">Arg::new</span>(<span class="string">&quot;input&quot;</span>)
.<span class="ident">help</span>(<span class="string">&quot;the file to add&quot;</span>)
.<span class="ident">index</span>(<span class="number">1</span>)
.<span class="ident">required</span>(<span class="bool-val">false</span>))
.<span class="ident">get_matches_from</span>(<span class="macro">vec!</span>[<span class="string">&quot;myprog&quot;</span>, <span class="string">&quot;do-tests&quot;</span>]);
<span class="macro">assert_eq!</span>(<span class="ident">m</span>.<span class="ident">subcommand_name</span>(), <span class="prelude-val">Some</span>(<span class="string">&quot;test&quot;</span>));</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.short_flag_aliases" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#2383-2389" title="goto source code">[src]</a></div><a href="#method.short_flag_aliases" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.short_flag_aliases" class="fnname">short_flag_aliases</a>(self, names: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.slice.html">&amp;[</a><a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.char.html">char</a><a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.slice.html">]</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>Add aliases, which function as “hidden” short flag subcommands.</p>
<p>These will automatically dispatch as if this subcommand was used. This is more efficient,
and easier than creating multiple hidden subcommands as one only needs to check for the
existence of this command, and not all variants.</p>
<h5 id="examples-67" class="section-header"><a href="#examples-67">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let</span> <span class="ident">m</span> <span class="op">=</span> <span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">subcommand</span>(<span class="ident">Command::new</span>(<span class="string">&quot;test&quot;</span>).<span class="ident">short_flag</span>(<span class="string">&#39;t&#39;</span>)
.<span class="ident">short_flag_aliases</span>(<span class="kw-2">&amp;</span>[<span class="string">&#39;a&#39;</span>, <span class="string">&#39;b&#39;</span>, <span class="string">&#39;c&#39;</span>]))
.<span class="ident">arg</span>(<span class="ident">Arg::new</span>(<span class="string">&quot;input&quot;</span>)
.<span class="ident">help</span>(<span class="string">&quot;the file to add&quot;</span>)
.<span class="ident">index</span>(<span class="number">1</span>)
.<span class="ident">required</span>(<span class="bool-val">false</span>))
.<span class="ident">get_matches_from</span>(<span class="macro">vec!</span>[<span class="string">&quot;myprog&quot;</span>, <span class="string">&quot;-a&quot;</span>]);
<span class="macro">assert_eq!</span>(<span class="ident">m</span>.<span class="ident">subcommand_name</span>(), <span class="prelude-val">Some</span>(<span class="string">&quot;test&quot;</span>));</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.long_flag_aliases" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#2412-2417" title="goto source code">[src]</a></div><a href="#method.long_flag_aliases" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.long_flag_aliases" class="fnname">long_flag_aliases</a>(self, names: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.slice.html">&amp;[</a>&amp;'help <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a><a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.slice.html">]</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>Add aliases, which function as “hidden” long flag subcommands.</p>
<p>These will automatically dispatch as if this subcommand was used. This is more efficient,
and easier than creating multiple hidden subcommands as one only needs to check for the
existence of this command, and not all variants.</p>
<h5 id="examples-68" class="section-header"><a href="#examples-68">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let</span> <span class="ident">m</span> <span class="op">=</span> <span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">subcommand</span>(<span class="ident">Command::new</span>(<span class="string">&quot;test&quot;</span>).<span class="ident">long_flag</span>(<span class="string">&quot;test&quot;</span>)
.<span class="ident">long_flag_aliases</span>(<span class="kw-2">&amp;</span>[<span class="string">&quot;testing&quot;</span>, <span class="string">&quot;testall&quot;</span>, <span class="string">&quot;test_all&quot;</span>]))
.<span class="ident">arg</span>(<span class="ident">Arg::new</span>(<span class="string">&quot;input&quot;</span>)
.<span class="ident">help</span>(<span class="string">&quot;the file to add&quot;</span>)
.<span class="ident">index</span>(<span class="number">1</span>)
.<span class="ident">required</span>(<span class="bool-val">false</span>))
.<span class="ident">get_matches_from</span>(<span class="macro">vec!</span>[<span class="string">&quot;myprog&quot;</span>, <span class="string">&quot;--testing&quot;</span>]);
<span class="macro">assert_eq!</span>(<span class="ident">m</span>.<span class="ident">subcommand_name</span>(), <span class="prelude-val">Some</span>(<span class="string">&quot;test&quot;</span>));</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.visible_alias" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#2447-2450" title="goto source code">[src]</a></div><a href="#method.visible_alias" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.visible_alias" class="fnname">visible_alias</a>&lt;S:&nbsp;<a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;&amp;'help <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>&gt;&gt;(self, name: S) -&gt; Self</h4></div></summary><div class="docblock"><p>Sets a visible alias to this subcommand.</p>
<p>This allows the subcommand to be accessed via <em>either</em> the
original name or the given alias. This is more efficient and easier
than creating hidden subcommands as one only needs to check for
the existence of this command and not all aliased variants.</p>
<p><strong>NOTE:</strong> The alias defined with this method is <em>visible</em> from the help
message and displayed as if it were just another regular subcommand. If
looking for an alias that will not be displayed in the help message, see
<a href="struct.App.html#method.alias" title="Command::alias"><code>Command::alias</code></a>.</p>
<p><strong>NOTE:</strong> When using aliases and checking for the existence of a
particular subcommand within an <a href="struct.ArgMatches.html" title="ArgMatches"><code>ArgMatches</code></a> struct, one only needs to
search for the original name and not all aliases.</p>
<h5 id="examples-69" class="section-header"><a href="#examples-69">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let</span> <span class="ident">m</span> <span class="op">=</span> <span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">subcommand</span>(<span class="ident">Command::new</span>(<span class="string">&quot;test&quot;</span>)
.<span class="ident">visible_alias</span>(<span class="string">&quot;do-stuff&quot;</span>))
.<span class="ident">get_matches_from</span>(<span class="macro">vec!</span>[<span class="string">&quot;myprog&quot;</span>, <span class="string">&quot;do-stuff&quot;</span>]);
<span class="macro">assert_eq!</span>(<span class="ident">m</span>.<span class="ident">subcommand_name</span>(), <span class="prelude-val">Some</span>(<span class="string">&quot;test&quot;</span>));</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.visible_short_flag_alias" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#2472-2476" title="goto source code">[src]</a></div><a href="#method.visible_short_flag_alias" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.visible_short_flag_alias" class="fnname">visible_short_flag_alias</a>(self, name: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.char.html">char</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>Add an alias, which functions as “visible” short flag subcommand</p>
<p>This will automatically dispatch as if this subcommand was used. This is more efficient,
and easier than creating multiple hidden subcommands as one only needs to check for the
existence of this command, and not all variants.</p>
<p>See also <a href="struct.App.html#method.short_flag_alias" title="Command::short_flag_alias"><code>Command::short_flag_alias</code></a>.</p>
<h5 id="examples-70" class="section-header"><a href="#examples-70">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let</span> <span class="ident">m</span> <span class="op">=</span> <span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">subcommand</span>(<span class="ident">Command::new</span>(<span class="string">&quot;test&quot;</span>).<span class="ident">short_flag</span>(<span class="string">&#39;t&#39;</span>)
.<span class="ident">visible_short_flag_alias</span>(<span class="string">&#39;d&#39;</span>))
.<span class="ident">get_matches_from</span>(<span class="macro">vec!</span>[<span class="string">&quot;myprog&quot;</span>, <span class="string">&quot;-d&quot;</span>]);
<span class="macro">assert_eq!</span>(<span class="ident">m</span>.<span class="ident">subcommand_name</span>(), <span class="prelude-val">Some</span>(<span class="string">&quot;test&quot;</span>));</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.visible_long_flag_alias" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#2498-2501" title="goto source code">[src]</a></div><a href="#method.visible_long_flag_alias" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.visible_long_flag_alias" class="fnname">visible_long_flag_alias</a>(self, name: &amp;'help <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>Add an alias, which functions as a “visible” long flag subcommand.</p>
<p>This will automatically dispatch as if this subcommand was used. This is more efficient,
and easier than creating multiple hidden subcommands as one only needs to check for the
existence of this command, and not all variants.</p>
<p>See also <a href="struct.App.html#method.long_flag_alias" title="Command::long_flag_alias"><code>Command::long_flag_alias</code></a>.</p>
<h5 id="examples-71" class="section-header"><a href="#examples-71">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let</span> <span class="ident">m</span> <span class="op">=</span> <span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">subcommand</span>(<span class="ident">Command::new</span>(<span class="string">&quot;test&quot;</span>).<span class="ident">long_flag</span>(<span class="string">&quot;test&quot;</span>)
.<span class="ident">visible_long_flag_alias</span>(<span class="string">&quot;testing&quot;</span>))
.<span class="ident">get_matches_from</span>(<span class="macro">vec!</span>[<span class="string">&quot;myprog&quot;</span>, <span class="string">&quot;--testing&quot;</span>]);
<span class="macro">assert_eq!</span>(<span class="ident">m</span>.<span class="ident">subcommand_name</span>(), <span class="prelude-val">Some</span>(<span class="string">&quot;test&quot;</span>));</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.visible_aliases" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#2531-2534" title="goto source code">[src]</a></div><a href="#method.visible_aliases" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.visible_aliases" class="fnname">visible_aliases</a>(self, names: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.slice.html">&amp;[</a>&amp;'help <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a><a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.slice.html">]</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>Sets multiple visible aliases to this subcommand.</p>
<p>This allows the subcommand to be accessed via <em>either</em> the
original name or any of the given aliases. This is more efficient and easier
than creating multiple hidden subcommands as one only needs to check for
the existence of this command and not all aliased variants.</p>
<p><strong>NOTE:</strong> The alias defined with this method is <em>visible</em> from the help
message and displayed as if it were just another regular subcommand. If
looking for an alias that will not be displayed in the help message, see
<a href="struct.App.html#method.alias" title="Command::alias"><code>Command::alias</code></a>.</p>
<p><strong>NOTE:</strong> When using aliases, and checking for the existence of a
particular subcommand within an <a href="struct.ArgMatches.html" title="ArgMatches"><code>ArgMatches</code></a> struct, one only needs to
search for the original name and not all aliases.</p>
<h5 id="examples-72" class="section-header"><a href="#examples-72">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let</span> <span class="ident">m</span> <span class="op">=</span> <span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">subcommand</span>(<span class="ident">Command::new</span>(<span class="string">&quot;test&quot;</span>)
.<span class="ident">visible_aliases</span>(<span class="kw-2">&amp;</span>[<span class="string">&quot;do-stuff&quot;</span>, <span class="string">&quot;tests&quot;</span>]))
.<span class="ident">get_matches_from</span>(<span class="macro">vec!</span>[<span class="string">&quot;myprog&quot;</span>, <span class="string">&quot;do-stuff&quot;</span>]);
<span class="macro">assert_eq!</span>(<span class="ident">m</span>.<span class="ident">subcommand_name</span>(), <span class="prelude-val">Some</span>(<span class="string">&quot;test&quot;</span>));</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.visible_short_flag_aliases" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#2552-2558" title="goto source code">[src]</a></div><a href="#method.visible_short_flag_aliases" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.visible_short_flag_aliases" class="fnname">visible_short_flag_aliases</a>(self, names: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.slice.html">&amp;[</a><a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.char.html">char</a><a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.slice.html">]</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>Add aliases, which function as <em>visible</em> short flag subcommands.</p>
<p>See <a href="struct.App.html#method.short_flag_aliases" title="Command::short_flag_aliases"><code>Command::short_flag_aliases</code></a>.</p>
<h5 id="examples-73" class="section-header"><a href="#examples-73">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let</span> <span class="ident">m</span> <span class="op">=</span> <span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">subcommand</span>(<span class="ident">Command::new</span>(<span class="string">&quot;test&quot;</span>).<span class="ident">short_flag</span>(<span class="string">&#39;b&#39;</span>)
.<span class="ident">visible_short_flag_aliases</span>(<span class="kw-2">&amp;</span>[<span class="string">&#39;t&#39;</span>]))
.<span class="ident">get_matches_from</span>(<span class="macro">vec!</span>[<span class="string">&quot;myprog&quot;</span>, <span class="string">&quot;-t&quot;</span>]);
<span class="macro">assert_eq!</span>(<span class="ident">m</span>.<span class="ident">subcommand_name</span>(), <span class="prelude-val">Some</span>(<span class="string">&quot;test&quot;</span>));</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.visible_long_flag_aliases" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#2576-2581" title="goto source code">[src]</a></div><a href="#method.visible_long_flag_aliases" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.visible_long_flag_aliases" class="fnname">visible_long_flag_aliases</a>(self, names: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.slice.html">&amp;[</a>&amp;'help <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a><a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.slice.html">]</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>Add aliases, which function as <em>visible</em> long flag subcommands.</p>
<p>See <a href="struct.App.html#method.long_flag_aliases" title="Command::long_flag_aliases"><code>Command::long_flag_aliases</code></a>.</p>
<h5 id="examples-74" class="section-header"><a href="#examples-74">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let</span> <span class="ident">m</span> <span class="op">=</span> <span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">subcommand</span>(<span class="ident">Command::new</span>(<span class="string">&quot;test&quot;</span>).<span class="ident">long_flag</span>(<span class="string">&quot;test&quot;</span>)
.<span class="ident">visible_long_flag_aliases</span>(<span class="kw-2">&amp;</span>[<span class="string">&quot;testing&quot;</span>, <span class="string">&quot;testall&quot;</span>, <span class="string">&quot;test_all&quot;</span>]))
.<span class="ident">get_matches_from</span>(<span class="macro">vec!</span>[<span class="string">&quot;myprog&quot;</span>, <span class="string">&quot;--testing&quot;</span>]);
<span class="macro">assert_eq!</span>(<span class="ident">m</span>.<span class="ident">subcommand_name</span>(), <span class="prelude-val">Some</span>(<span class="string">&quot;test&quot;</span>));</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.display_order" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#2633-2636" title="goto source code">[src]</a></div><a href="#method.display_order" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.display_order" class="fnname">display_order</a>(self, ord: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.usize.html">usize</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>Set the placement of this subcommand within the help.</p>
<p>Subcommands with a lower value will be displayed first in the help message. Subcommands
with duplicate display orders will be displayed in alphabetical order.</p>
<p>This is helpful when one would like to emphasize frequently used subcommands, or prioritize
those towards the top of the list.</p>
<p><strong>NOTE:</strong> The default is 999 for all subcommands.</p>
<h5 id="examples-75" class="section-header"><a href="#examples-75">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let</span> <span class="ident">m</span> <span class="op">=</span> <span class="ident">Command::new</span>(<span class="string">&quot;cust-ord&quot;</span>)
.<span class="ident">subcommand</span>(<span class="ident">Command::new</span>(<span class="string">&quot;alpha&quot;</span>) <span class="comment">// typically subcommands are grouped</span>
<span class="comment">// alphabetically by name. Subcommands</span>
<span class="comment">// without a display_order have a value of</span>
<span class="comment">// 999 and are displayed alphabetically with</span>
<span class="comment">// all other 999 subcommands</span>
.<span class="ident">about</span>(<span class="string">&quot;Some help and text&quot;</span>))
.<span class="ident">subcommand</span>(<span class="ident">Command::new</span>(<span class="string">&quot;beta&quot;</span>)
.<span class="ident">display_order</span>(<span class="number">1</span>) <span class="comment">// In order to force this subcommand to appear *first*</span>
<span class="comment">// all we have to do is give it a value lower than 999.</span>
<span class="comment">// Any other subcommands with a value of 1 will be displayed</span>
<span class="comment">// alphabetically with this one...then 2 values, then 3, etc.</span>
.<span class="ident">about</span>(<span class="string">&quot;I should be first!&quot;</span>))
.<span class="ident">get_matches_from</span>(<span class="macro">vec!</span>[
<span class="string">&quot;cust-ord&quot;</span>, <span class="string">&quot;--help&quot;</span>
]);</code></pre></div>
<p>The above example displays the following help message</p>
<div class="example-wrap"><pre class="language-text"><code>cust-ord
USAGE:
cust-ord [OPTIONS]
OPTIONS:
-h, --help Print help information
-V, --version Print version information
SUBCOMMANDS:
beta I should be first!
alpha Some help and text</code></pre></div></div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.hide" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#2653-2659" title="goto source code">[src]</a></div><a href="#method.hide" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.hide" class="fnname">hide</a>(self, yes: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>Specifies that this <a href="struct.App.html#method.subcommand"><code>subcommand</code></a> should be hidden from help messages</p>
<h5 id="examples-76" class="section-header"><a href="#examples-76">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">subcommand</span>(
<span class="ident">Command::new</span>(<span class="string">&quot;test&quot;</span>).<span class="ident">hide</span>(<span class="bool-val">true</span>)
)</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.subcommand_required" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#2679-2685" title="goto source code">[src]</a></div><a href="#method.subcommand_required" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.subcommand_required" class="fnname">subcommand_required</a>(self, yes: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>If no <a href="struct.App.html#method.subcommand"><code>subcommand</code></a> is present at runtime, error and exit gracefully.</p>
<h5 id="examples-77" class="section-header"><a href="#examples-77">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let</span> <span class="ident">err</span> <span class="op">=</span> <span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">subcommand_required</span>(<span class="bool-val">true</span>)
.<span class="ident">subcommand</span>(<span class="ident">Command::new</span>(<span class="string">&quot;test&quot;</span>))
.<span class="ident">try_get_matches_from</span>(<span class="macro">vec!</span>[
<span class="string">&quot;myprog&quot;</span>,
]);
<span class="macro">assert!</span>(<span class="ident">err</span>.<span class="ident">is_err</span>());
<span class="macro">assert_eq!</span>(<span class="ident">err</span>.<span class="ident">unwrap_err</span>().<span class="ident">kind</span>(), <span class="ident">ErrorKind::MissingSubcommand</span>);</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.allow_external_subcommands" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#2720-2726" title="goto source code">[src]</a></div><a href="#method.allow_external_subcommands" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.allow_external_subcommands" class="fnname">allow_external_subcommands</a>(self, yes: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>Assume unexpected positional arguments are a <a href="struct.App.html#method.subcommand"><code>subcommand</code></a>.</p>
<p><strong>NOTE:</strong> Use this setting with caution,
as a truly unexpected argument (i.e. one that is <em>NOT</em> an external subcommand)
will <strong>not</strong> cause an error and instead be treated as a potential subcommand.
One should check for such cases manually and inform the user appropriately.</p>
<h5 id="examples-78" class="section-header"><a href="#examples-78">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="comment">// Assume there is an external subcommand named &quot;subcmd&quot;</span>
<span class="kw">let</span> <span class="ident">m</span> <span class="op">=</span> <span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">allow_external_subcommands</span>(<span class="bool-val">true</span>)
.<span class="ident">get_matches_from</span>(<span class="macro">vec!</span>[
<span class="string">&quot;myprog&quot;</span>, <span class="string">&quot;subcmd&quot;</span>, <span class="string">&quot;--option&quot;</span>, <span class="string">&quot;value&quot;</span>, <span class="string">&quot;-fff&quot;</span>, <span class="string">&quot;--flag&quot;</span>
]);
<span class="comment">// All trailing arguments will be stored under the subcommand&#39;s sub-matches using an empty</span>
<span class="comment">// string argument name</span>
<span class="kw">match</span> <span class="ident">m</span>.<span class="ident">subcommand</span>() {
<span class="prelude-val">Some</span>((<span class="ident">external</span>, <span class="ident">ext_m</span>)) =&gt; {
<span class="kw">let</span> <span class="ident">ext_args</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="kw-2">&amp;</span><span class="ident">str</span><span class="op">&gt;</span> <span class="op">=</span> <span class="ident">ext_m</span>.<span class="ident">values_of</span>(<span class="string">&quot;&quot;</span>).<span class="ident">unwrap</span>().<span class="ident">collect</span>();
<span class="macro">assert_eq!</span>(<span class="ident">external</span>, <span class="string">&quot;subcmd&quot;</span>);
<span class="macro">assert_eq!</span>(<span class="ident">ext_args</span>, [<span class="string">&quot;--option&quot;</span>, <span class="string">&quot;value&quot;</span>, <span class="string">&quot;-fff&quot;</span>, <span class="string">&quot;--flag&quot;</span>]);
},
<span class="kw">_</span> =&gt; {},
}</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.allow_invalid_utf8_for_external_subcommands" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#2768-2774" title="goto source code">[src]</a></div><a href="#method.allow_invalid_utf8_for_external_subcommands" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.allow_invalid_utf8_for_external_subcommands" class="fnname">allow_invalid_utf8_for_external_subcommands</a>(self, yes: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>Specifies that external subcommands that are invalid UTF-8 should <em>not</em> be treated as an error.</p>
<p><strong>NOTE:</strong> Using external subcommand argument values with invalid UTF-8 requires using
<a href="struct.ArgMatches.html#method.values_of_os"><code>ArgMatches::values_of_os</code></a> or <a href="struct.ArgMatches.html#method.values_of_lossy"><code>ArgMatches::values_of_lossy</code></a> for those particular
arguments which may contain invalid UTF-8 values</p>
<p><strong>NOTE:</strong> Setting this requires <a href="struct.App.html#method.allow_external_subcommands" title="Command::allow_external_subcommands"><code>Command::allow_external_subcommands</code></a></p>
<h5 id="platform-specific" class="section-header"><a href="#platform-specific">Platform Specific</a></h5>
<p>Non Windows systems only</p>
<h5 id="examples-79" class="section-header"><a href="#examples-79">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="comment">// Assume there is an external subcommand named &quot;subcmd&quot;</span>
<span class="kw">let</span> <span class="ident">m</span> <span class="op">=</span> <span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">allow_invalid_utf8_for_external_subcommands</span>(<span class="bool-val">true</span>)
.<span class="ident">allow_external_subcommands</span>(<span class="bool-val">true</span>)
.<span class="ident">get_matches_from</span>(<span class="macro">vec!</span>[
<span class="string">&quot;myprog&quot;</span>, <span class="string">&quot;subcmd&quot;</span>, <span class="string">&quot;--option&quot;</span>, <span class="string">&quot;value&quot;</span>, <span class="string">&quot;-fff&quot;</span>, <span class="string">&quot;--flag&quot;</span>
]);
<span class="comment">// All trailing arguments will be stored under the subcommand&#39;s sub-matches using an empty</span>
<span class="comment">// string argument name</span>
<span class="kw">match</span> <span class="ident">m</span>.<span class="ident">subcommand</span>() {
<span class="prelude-val">Some</span>((<span class="ident">external</span>, <span class="ident">ext_m</span>)) =&gt; {
<span class="kw">let</span> <span class="ident">ext_args</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="kw-2">&amp;</span><span class="ident">std::ffi::OsStr</span><span class="op">&gt;</span> <span class="op">=</span> <span class="ident">ext_m</span>.<span class="ident">values_of_os</span>(<span class="string">&quot;&quot;</span>).<span class="ident">unwrap</span>().<span class="ident">collect</span>();
<span class="macro">assert_eq!</span>(<span class="ident">external</span>, <span class="string">&quot;subcmd&quot;</span>);
<span class="macro">assert_eq!</span>(<span class="ident">ext_args</span>, [<span class="string">&quot;--option&quot;</span>, <span class="string">&quot;value&quot;</span>, <span class="string">&quot;-fff&quot;</span>, <span class="string">&quot;--flag&quot;</span>]);
},
<span class="kw">_</span> =&gt; {},
}</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.args_conflicts_with_subcommands" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#2798-2804" title="goto source code">[src]</a></div><a href="#method.args_conflicts_with_subcommands" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.args_conflicts_with_subcommands" class="fnname">args_conflicts_with_subcommands</a>(self, yes: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>Specifies that use of an argument prevents the use of <a href="struct.App.html#method.subcommand"><code>subcommands</code></a>.</p>
<p>By default <code>clap</code> allows arguments between subcommands such
as <code>&lt;cmd&gt; [cmd_args] &lt;subcmd&gt; [subcmd_args] &lt;subsubcmd&gt; [subsubcmd_args]</code>.</p>
<p>This setting disables that functionality and says that arguments can
only follow the <em>final</em> subcommand. For instance using this setting
makes only the following invocations possible:</p>
<ul>
<li><code>&lt;cmd&gt; &lt;subcmd&gt; &lt;subsubcmd&gt; [subsubcmd_args]</code></li>
<li><code>&lt;cmd&gt; &lt;subcmd&gt; [subcmd_args]</code></li>
<li><code>&lt;cmd&gt; [cmd_args]</code></li>
</ul>
<h5 id="examples-80" class="section-header"><a href="#examples-80">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">args_conflicts_with_subcommands</span>(<span class="bool-val">true</span>);</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.subcommand_precedence_over_arg" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#2860-2866" title="goto source code">[src]</a></div><a href="#method.subcommand_precedence_over_arg" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.subcommand_precedence_over_arg" class="fnname">subcommand_precedence_over_arg</a>(self, yes: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>Prevent subcommands from being consumed as an arguments value.</p>
<p>By default, if an option taking multiple values is followed by a subcommand, the
subcommand will be parsed as another value.</p>
<div class="example-wrap"><pre class="language-text"><code>cmd --foo val1 val2 subcommand
--------- ----------
values another value</code></pre></div>
<p>This setting instructs the parser to stop when encountering a subcommand instead of
greedily consuming arguments.</p>
<div class="example-wrap"><pre class="language-text"><code>cmd --foo val1 val2 subcommand
--------- ----------
values subcommand</code></pre></div>
<p><strong>Note:</strong> Make sure you apply it as <code>global_setting</code> if you want this setting
to be propagated to subcommands and sub-subcommands!</p>
<h5 id="examples-81" class="section-header"><a href="#examples-81">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let</span> <span class="ident">cmd</span> <span class="op">=</span> <span class="ident">Command::new</span>(<span class="string">&quot;cmd&quot;</span>).<span class="ident">subcommand</span>(<span class="ident">Command::new</span>(<span class="string">&quot;sub&quot;</span>)).<span class="ident">arg</span>(
<span class="ident">Arg::new</span>(<span class="string">&quot;arg&quot;</span>)
.<span class="ident">long</span>(<span class="string">&quot;arg&quot;</span>)
.<span class="ident">multiple_values</span>(<span class="bool-val">true</span>)
.<span class="ident">takes_value</span>(<span class="bool-val">true</span>),
);
<span class="kw">let</span> <span class="ident">matches</span> <span class="op">=</span> <span class="ident">cmd</span>
.<span class="ident">clone</span>()
.<span class="ident">try_get_matches_from</span>(<span class="kw-2">&amp;</span>[<span class="string">&quot;cmd&quot;</span>, <span class="string">&quot;--arg&quot;</span>, <span class="string">&quot;1&quot;</span>, <span class="string">&quot;2&quot;</span>, <span class="string">&quot;3&quot;</span>, <span class="string">&quot;sub&quot;</span>])
.<span class="ident">unwrap</span>();
<span class="macro">assert_eq!</span>(
<span class="ident">matches</span>.<span class="ident">values_of</span>(<span class="string">&quot;arg&quot;</span>).<span class="ident">unwrap</span>().<span class="ident">collect</span>::<span class="op">&lt;</span><span class="ident">Vec</span><span class="op">&lt;</span><span class="kw">_</span><span class="op">&gt;</span><span class="op">&gt;</span>(),
<span class="kw-2">&amp;</span>[<span class="string">&quot;1&quot;</span>, <span class="string">&quot;2&quot;</span>, <span class="string">&quot;3&quot;</span>, <span class="string">&quot;sub&quot;</span>]
);
<span class="macro">assert!</span>(<span class="ident">matches</span>.<span class="ident">subcommand_matches</span>(<span class="string">&quot;sub&quot;</span>).<span class="ident">is_none</span>());
<span class="kw">let</span> <span class="ident">matches</span> <span class="op">=</span> <span class="ident">cmd</span>
.<span class="ident">subcommand_precedence_over_arg</span>(<span class="bool-val">true</span>)
.<span class="ident">try_get_matches_from</span>(<span class="kw-2">&amp;</span>[<span class="string">&quot;cmd&quot;</span>, <span class="string">&quot;--arg&quot;</span>, <span class="string">&quot;1&quot;</span>, <span class="string">&quot;2&quot;</span>, <span class="string">&quot;3&quot;</span>, <span class="string">&quot;sub&quot;</span>])
.<span class="ident">unwrap</span>();
<span class="macro">assert_eq!</span>(
<span class="ident">matches</span>.<span class="ident">values_of</span>(<span class="string">&quot;arg&quot;</span>).<span class="ident">unwrap</span>().<span class="ident">collect</span>::<span class="op">&lt;</span><span class="ident">Vec</span><span class="op">&lt;</span><span class="kw">_</span><span class="op">&gt;</span><span class="op">&gt;</span>(),
<span class="kw-2">&amp;</span>[<span class="string">&quot;1&quot;</span>, <span class="string">&quot;2&quot;</span>, <span class="string">&quot;3&quot;</span>]
);
<span class="macro">assert!</span>(<span class="ident">matches</span>.<span class="ident">subcommand_matches</span>(<span class="string">&quot;sub&quot;</span>).<span class="ident">is_some</span>());</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.subcommand_negates_reqs" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#2913-2919" title="goto source code">[src]</a></div><a href="#method.subcommand_negates_reqs" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.subcommand_negates_reqs" class="fnname">subcommand_negates_reqs</a>(self, yes: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>Allows <a href="struct.App.html#method.subcommand"><code>subcommands</code></a> to override all requirements of the parent command.</p>
<p>For example, if you had a subcommand or top level application with a required argument
that is only required as long as there is no subcommand present,
using this setting would allow you to set those arguments to <a href="struct.Arg.html#method.required"><code>Arg::required(true)</code></a>
and yet receive no error so long as the user uses a valid subcommand instead.</p>
<p><strong>NOTE:</strong> This defaults to false (using subcommand does <em>not</em> negate requirements)</p>
<h5 id="examples-82" class="section-header"><a href="#examples-82">Examples</a></h5>
<p>This first example shows that it is an error to not use a required argument</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let</span> <span class="ident">err</span> <span class="op">=</span> <span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">subcommand_negates_reqs</span>(<span class="bool-val">true</span>)
.<span class="ident">arg</span>(<span class="ident">Arg::new</span>(<span class="string">&quot;opt&quot;</span>).<span class="ident">required</span>(<span class="bool-val">true</span>))
.<span class="ident">subcommand</span>(<span class="ident">Command::new</span>(<span class="string">&quot;test&quot;</span>))
.<span class="ident">try_get_matches_from</span>(<span class="macro">vec!</span>[
<span class="string">&quot;myprog&quot;</span>
]);
<span class="macro">assert!</span>(<span class="ident">err</span>.<span class="ident">is_err</span>());
<span class="macro">assert_eq!</span>(<span class="ident">err</span>.<span class="ident">unwrap_err</span>().<span class="ident">kind</span>(), <span class="ident">ErrorKind::MissingRequiredArgument</span>);</code></pre></div>
<p>This next example shows that it is no longer error to not use a required argument if a
valid subcommand is used.</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let</span> <span class="ident">noerr</span> <span class="op">=</span> <span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">subcommand_negates_reqs</span>(<span class="bool-val">true</span>)
.<span class="ident">arg</span>(<span class="ident">Arg::new</span>(<span class="string">&quot;opt&quot;</span>).<span class="ident">required</span>(<span class="bool-val">true</span>))
.<span class="ident">subcommand</span>(<span class="ident">Command::new</span>(<span class="string">&quot;test&quot;</span>))
.<span class="ident">try_get_matches_from</span>(<span class="macro">vec!</span>[
<span class="string">&quot;myprog&quot;</span>, <span class="string">&quot;test&quot;</span>
]);
<span class="macro">assert!</span>(<span class="ident">noerr</span>.<span class="ident">is_ok</span>());</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.subcommand_value_name" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3085-3091" title="goto source code">[src]</a></div><a href="#method.subcommand_value_name" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.subcommand_value_name" class="fnname">subcommand_value_name</a>&lt;S&gt;(self, value_name: S) -&gt; Self <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;&amp;'help <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>&gt;,&nbsp;</span></h4></div></summary><div class="docblock"><p>Sets the value name used for subcommands when printing usage and help.</p>
<p>By default, this is “SUBCOMMAND”.</p>
<p>See also <a href="struct.App.html#method.subcommand_help_heading" title="Command::subcommand_help_heading"><code>Command::subcommand_help_heading</code></a></p>
<h5 id="examples-83" class="section-header"><a href="#examples-83">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">subcommand</span>(<span class="ident">Command::new</span>(<span class="string">&quot;sub1&quot;</span>))
.<span class="ident">print_help</span>()</code></pre></div>
<p>will produce</p>
<div class="example-wrap"><pre class="language-text"><code>myprog
USAGE:
myprog [SUBCOMMAND]
OPTIONS:
-h, --help Print help information
-V, --version Print version information
SUBCOMMANDS:
help Print this message or the help of the given subcommand(s)
sub1</code></pre></div>
<p>but usage of <code>subcommand_value_name</code></p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">subcommand</span>(<span class="ident">Command::new</span>(<span class="string">&quot;sub1&quot;</span>))
.<span class="ident">subcommand_value_name</span>(<span class="string">&quot;THING&quot;</span>)
.<span class="ident">print_help</span>()</code></pre></div>
<p>will produce</p>
<div class="example-wrap"><pre class="language-text"><code>myprog
USAGE:
myprog [THING]
OPTIONS:
-h, --help Print help information
-V, --version Print version information
SUBCOMMANDS:
help Print this message or the help of the given subcommand(s)
sub1</code></pre></div></div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.subcommand_help_heading" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3154-3160" title="goto source code">[src]</a></div><a href="#method.subcommand_help_heading" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.subcommand_help_heading" class="fnname">subcommand_help_heading</a>&lt;T&gt;(self, heading: T) -&gt; Self <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;&amp;'help <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>&gt;,&nbsp;</span></h4></div></summary><div class="docblock"><p>Sets the help heading used for subcommands when printing usage and help.</p>
<p>By default, this is “SUBCOMMANDS”.</p>
<p>See also <a href="struct.App.html#method.subcommand_value_name" title="Command::subcommand_value_name"><code>Command::subcommand_value_name</code></a></p>
<h5 id="examples-84" class="section-header"><a href="#examples-84">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">subcommand</span>(<span class="ident">Command::new</span>(<span class="string">&quot;sub1&quot;</span>))
.<span class="ident">print_help</span>()</code></pre></div>
<p>will produce</p>
<div class="example-wrap"><pre class="language-text"><code>myprog
USAGE:
myprog [SUBCOMMAND]
OPTIONS:
-h, --help Print help information
-V, --version Print version information
SUBCOMMANDS:
help Print this message or the help of the given subcommand(s)
sub1</code></pre></div>
<p>but usage of <code>subcommand_help_heading</code></p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="ident">Command::new</span>(<span class="string">&quot;myprog&quot;</span>)
.<span class="ident">subcommand</span>(<span class="ident">Command::new</span>(<span class="string">&quot;sub1&quot;</span>))
.<span class="ident">subcommand_help_heading</span>(<span class="string">&quot;THINGS&quot;</span>)
.<span class="ident">print_help</span>()</code></pre></div>
<p>will produce</p>
<div class="example-wrap"><pre class="language-text"><code>myprog
USAGE:
myprog [SUBCOMMAND]
OPTIONS:
-h, --help Print help information
-V, --version Print version information
THINGS:
help Print this message or the help of the given subcommand(s)
sub1</code></pre></div></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-4" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3164-3646" title="goto source code">[src]</a></div><a href="#impl-4" class="anchor"></a><h3 class="code-header in-band">impl&lt;'help&gt; <a class="struct" href="struct.App.html" title="struct clap::App">App</a>&lt;'help&gt;</h3></div></summary><div class="docblock"><h4 id="reflection" class="section-header"><a href="#reflection">Reflection</a></h4></div><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.get_bin_name" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3172-3174" title="goto source code">[src]</a></div><a href="#method.get_bin_name" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.get_bin_name" class="fnname">get_bin_name</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>&gt;</h4></div></summary><div class="docblock"><p>Get the name of the binary.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.set_bin_name" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3177-3179" title="goto source code">[src]</a></div><a href="#method.set_bin_name" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.set_bin_name" class="fnname">set_bin_name</a>&lt;S:&nbsp;<a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;&gt;(&amp;mut self, name: S)</h4></div></summary><div class="docblock"><p>Set binary name. Uses <code>&amp;mut self</code> instead of <code>self</code>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.get_name" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3183-3185" title="goto source code">[src]</a></div><a href="#method.get_name" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.get_name" class="fnname">get_name</a>(&amp;self) -&gt; &amp;<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a></h4></div></summary><div class="docblock"><p>Get the name of the cmd.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.get_version" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3189-3191" title="goto source code">[src]</a></div><a href="#method.get_version" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.get_version" class="fnname">get_version</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;'help <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>&gt;</h4></div></summary><div class="docblock"><p>Get the version of the cmd.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.get_long_version" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3195-3197" title="goto source code">[src]</a></div><a href="#method.get_long_version" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.get_long_version" class="fnname">get_long_version</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;'help <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>&gt;</h4></div></summary><div class="docblock"><p>Get the long version of the cmd.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.get_author" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3201-3203" title="goto source code">[src]</a></div><a href="#method.get_author" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.get_author" class="fnname">get_author</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;'help <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>&gt;</h4></div></summary><div class="docblock"><p>Get the authors of the cmd.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.get_short_flag" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3207-3209" title="goto source code">[src]</a></div><a href="#method.get_short_flag" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.get_short_flag" class="fnname">get_short_flag</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.char.html">char</a>&gt;</h4></div></summary><div class="docblock"><p>Get the short flag of the subcommand.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.get_long_flag" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3213-3215" title="goto source code">[src]</a></div><a href="#method.get_long_flag" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.get_long_flag" class="fnname">get_long_flag</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;'help <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>&gt;</h4></div></summary><div class="docblock"><p>Get the long flag of the subcommand.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.get_about" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3221-3223" title="goto source code">[src]</a></div><a href="#method.get_about" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.get_about" class="fnname">get_about</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;'help <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>&gt;</h4></div></summary><div class="docblock"><p>Get the help message specified via <a href="struct.App.html#method.about" title="Command::about"><code>Command::about</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.get_long_about" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3229-3231" title="goto source code">[src]</a></div><a href="#method.get_long_about" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.get_long_about" class="fnname">get_long_about</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;'help <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>&gt;</h4></div></summary><div class="docblock"><p>Get the help message specified via <a href="struct.App.html#method.long_about" title="Command::long_about"><code>Command::long_about</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.get_help_heading" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3236-3238" title="goto source code">[src]</a></div><a href="#method.get_help_heading" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.get_help_heading" class="fnname">get_help_heading</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;'help <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>&gt;</h4></div><div class="item-info"><div class="stab deprecated"><span class="emoji">👎</span> Deprecated since 3.1.0: <p>Replaced with <code>App::get_next_help_heading</code></p>
</div></div></summary><div class="docblock"><p>Deprecated, replaced with <a href="struct.App.html#method.get_next_help_heading" title="Command::get_next_help_heading"><code>Command::get_next_help_heading</code></a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.get_next_help_heading" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3244-3246" title="goto source code">[src]</a></div><a href="#method.get_next_help_heading" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.get_next_help_heading" class="fnname">get_next_help_heading</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;'help <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>&gt;</h4></div></summary><div class="docblock"><p>Get the custom section heading specified via <a href="struct.App.html#method.help_heading" title="Command::help_heading"><code>Command::help_heading</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.get_visible_aliases" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3250-3252" title="goto source code">[src]</a></div><a href="#method.get_visible_aliases" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.get_visible_aliases" class="fnname">get_visible_aliases</a>(&amp;self) -&gt; impl <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a>&lt;Item = &amp;'help <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>&gt; + '_</h4></div></summary><div class="docblock"><p>Iterate through the <em>visible</em> aliases for this subcommand.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.get_visible_short_flag_aliases" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3256-3261" title="goto source code">[src]</a></div><a href="#method.get_visible_short_flag_aliases" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.get_visible_short_flag_aliases" class="fnname">get_visible_short_flag_aliases</a>(&amp;self) -&gt; impl <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a>&lt;Item = <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.char.html">char</a>&gt; + '_</h4></div></summary><div class="docblock"><p>Iterate through the <em>visible</em> short aliases for this subcommand.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.get_visible_long_flag_aliases" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3265-3270" title="goto source code">[src]</a></div><a href="#method.get_visible_long_flag_aliases" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.get_visible_long_flag_aliases" class="fnname">get_visible_long_flag_aliases</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self<br>) -&gt; impl <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a>&lt;Item = &amp;'help <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>&gt; + '_</h4></div></summary><div class="docblock"><p>Iterate through the <em>visible</em> long aliases for this subcommand.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.get_all_aliases" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3274-3276" title="goto source code">[src]</a></div><a href="#method.get_all_aliases" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.get_all_aliases" class="fnname">get_all_aliases</a>(&amp;self) -&gt; impl <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a>&lt;Item = &amp;<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>&gt; + '_</h4></div></summary><div class="docblock"><p>Iterate through the set of <em>all</em> the aliases for this subcommand, both visible and hidden.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.get_all_short_flag_aliases" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3280-3282" title="goto source code">[src]</a></div><a href="#method.get_all_short_flag_aliases" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.get_all_short_flag_aliases" class="fnname">get_all_short_flag_aliases</a>(&amp;self) -&gt; impl <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a>&lt;Item = <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.char.html">char</a>&gt; + '_</h4></div></summary><div class="docblock"><p>Iterate through the set of <em>all</em> the short aliases for this subcommand, both visible and hidden.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.get_all_long_flag_aliases" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3286-3288" title="goto source code">[src]</a></div><a href="#method.get_all_long_flag_aliases" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.get_all_long_flag_aliases" class="fnname">get_all_long_flag_aliases</a>(&amp;self) -&gt; impl <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a>&lt;Item = &amp;'help <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>&gt; + '_</h4></div></summary><div class="docblock"><p>Iterate through the set of <em>all</em> the long aliases for this subcommand, both visible and hidden.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.is_set" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3297-3299" title="goto source code">[src]</a></div><a href="#method.is_set" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.is_set" class="fnname">is_set</a>(&amp;self, s: <a class="enum" href="enum.AppSettings.html" title="enum clap::AppSettings">AppSettings</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a></h4></div></summary><div class="docblock"><p>Check if the given <a href="enum.AppSettings.html" title="AppSettings"><code>AppSettings</code></a> variant is currently set on the <code>Command</code>.</p>
<p>This checks both <a href="struct.App.html#method.setting">local</a> and <a href="struct.App.html#method.global_setting">global settings</a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.get_color" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3303-3321" title="goto source code">[src]</a></div><a href="#method.get_color" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.get_color" class="fnname">get_color</a>(&amp;self) -&gt; <a class="enum" href="enum.ColorChoice.html" title="enum clap::ColorChoice">ColorChoice</a></h4></div></summary><div class="docblock"><p>Should we color the output?</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.get_subcommands" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3325-3327" title="goto source code">[src]</a></div><a href="#method.get_subcommands" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.get_subcommands" class="fnname">get_subcommands</a>(&amp;self) -&gt; impl <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a>&lt;Item = &amp;<a class="struct" href="struct.App.html" title="struct clap::App">App</a>&lt;'help&gt;&gt;</h4></div></summary><div class="docblock"><p>Iterate through the set of subcommands, getting a reference to each.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.get_subcommands_mut" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3331-3333" title="goto source code">[src]</a></div><a href="#method.get_subcommands_mut" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.get_subcommands_mut" class="fnname">get_subcommands_mut</a>(&amp;mut self) -&gt; impl <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a>&lt;Item = &amp;mut <a class="struct" href="struct.App.html" title="struct clap::App">App</a>&lt;'help&gt;&gt;</h4></div></summary><div class="docblock"><p>Iterate through the set of subcommands, getting a mutable reference to each.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.has_subcommands" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3337-3339" title="goto source code">[src]</a></div><a href="#method.has_subcommands" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.has_subcommands" class="fnname">has_subcommands</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a></h4></div></summary><div class="docblock"><p>Returns <code>true</code> if this <code>Command</code> has subcommands.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.get_subcommand_help_heading" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3343-3345" title="goto source code">[src]</a></div><a href="#method.get_subcommand_help_heading" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.get_subcommand_help_heading" class="fnname">get_subcommand_help_heading</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>&gt;</h4></div></summary><div class="docblock"><p>Returns the help heading for listing subcommands.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.get_subommand_help_heading" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3353-3355" title="goto source code">[src]</a></div><a href="#method.get_subommand_help_heading" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.get_subommand_help_heading" class="fnname">get_subommand_help_heading</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>&gt;</h4></div><div class="item-info"><div class="stab deprecated"><span class="emoji">👎</span> Deprecated since 3.1.0: <p>Replaced with <code>App::get_subcommand_help_heading</code></p>
</div></div></summary><div class="docblock"><p>Deprecated, replaced with <a href="struct.App.html#method.get_subcommand_help_heading" title="App::get_subcommand_help_heading"><code>App::get_subcommand_help_heading</code></a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.get_subcommand_value_name" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3359-3361" title="goto source code">[src]</a></div><a href="#method.get_subcommand_value_name" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.get_subcommand_value_name" class="fnname">get_subcommand_value_name</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>&gt;</h4></div></summary><div class="docblock"><p>Returns the subcommand value name.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.get_before_help" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3365-3367" title="goto source code">[src]</a></div><a href="#method.get_before_help" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.get_before_help" class="fnname">get_before_help</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>&gt;</h4></div></summary><div class="docblock"><p>Returns the help heading for listing subcommands.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.get_before_long_help" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3371-3373" title="goto source code">[src]</a></div><a href="#method.get_before_long_help" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.get_before_long_help" class="fnname">get_before_long_help</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>&gt;</h4></div></summary><div class="docblock"><p>Returns the help heading for listing subcommands.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.get_after_help" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3377-3379" title="goto source code">[src]</a></div><a href="#method.get_after_help" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.get_after_help" class="fnname">get_after_help</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>&gt;</h4></div></summary><div class="docblock"><p>Returns the help heading for listing subcommands.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.get_after_long_help" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3383-3385" title="goto source code">[src]</a></div><a href="#method.get_after_long_help" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.get_after_long_help" class="fnname">get_after_long_help</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>&gt;</h4></div></summary><div class="docblock"><p>Returns the help heading for listing subcommands.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.find_subcommand" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3391-3396" title="goto source code">[src]</a></div><a href="#method.find_subcommand" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.find_subcommand" class="fnname">find_subcommand</a>&lt;T&gt;(&amp;self, name: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.reference.html">&amp;</a>T) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="struct.App.html" title="struct clap::App">App</a>&lt;'help&gt;&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>&gt; + ?<a class="trait" href="https://doc.rust-lang.org/1.59.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></h4></div></summary><div class="docblock"><p>Find subcommand such that its name or one of aliases equals <code>name</code>.</p>
<p>This does not recurse through subcommands of subcommands.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.find_subcommand_mut" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3403-3408" title="goto source code">[src]</a></div><a href="#method.find_subcommand_mut" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.find_subcommand_mut" class="fnname">find_subcommand_mut</a>&lt;T&gt;(&amp;mut self, name: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.reference.html">&amp;</a>T) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;mut <a class="struct" href="struct.App.html" title="struct clap::App">App</a>&lt;'help&gt;&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>&gt; + ?<a class="trait" href="https://doc.rust-lang.org/1.59.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></h4></div></summary><div class="docblock"><p>Find subcommand such that its name or one of aliases equals <code>name</code>, returning
a mutable reference to the subcommand.</p>
<p>This does not recurse through subcommands of subcommands.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.get_groups" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3412-3414" title="goto source code">[src]</a></div><a href="#method.get_groups" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.get_groups" class="fnname">get_groups</a>(&amp;self) -&gt; impl <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a>&lt;Item = &amp;<a class="struct" href="struct.ArgGroup.html" title="struct clap::ArgGroup">ArgGroup</a>&lt;'help&gt;&gt;</h4></div></summary><div class="docblock"><p>Iterate through the set of groups.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.get_arguments" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3418-3420" title="goto source code">[src]</a></div><a href="#method.get_arguments" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.get_arguments" class="fnname">get_arguments</a>(&amp;self) -&gt; impl <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a>&lt;Item = &amp;<a class="struct" href="struct.Arg.html" title="struct clap::Arg">Arg</a>&lt;'help&gt;&gt;</h4></div></summary><div class="docblock"><p>Iterate through the set of arguments.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.get_positionals" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3424-3426" title="goto source code">[src]</a></div><a href="#method.get_positionals" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.get_positionals" class="fnname">get_positionals</a>(&amp;self) -&gt; impl <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a>&lt;Item = &amp;<a class="struct" href="struct.Arg.html" title="struct clap::Arg">Arg</a>&lt;'help&gt;&gt;</h4></div></summary><div class="docblock"><p>Iterate through the <em>positionals</em> arguments.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.get_opts" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3429-3432" title="goto source code">[src]</a></div><a href="#method.get_opts" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.get_opts" class="fnname">get_opts</a>(&amp;self) -&gt; impl <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a>&lt;Item = &amp;<a class="struct" href="struct.Arg.html" title="struct clap::Arg">Arg</a>&lt;'help&gt;&gt;</h4></div></summary><div class="docblock"><p>Iterate through the <em>options</em>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.get_arg_conflicts_with" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3443-3458" title="goto source code">[src]</a></div><a href="#method.get_arg_conflicts_with" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.get_arg_conflicts_with" class="fnname">get_arg_conflicts_with</a>(&amp;self, arg: &amp;<a class="struct" href="struct.Arg.html" title="struct clap::Arg">Arg</a>&lt;'_&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;&amp;<a class="struct" href="struct.Arg.html" title="struct clap::Arg">Arg</a>&lt;'help&gt;&gt;</h4></div></summary><div class="docblock"><p>Get a list of all arguments the given argument conflicts with.</p>
<p>If the provided argument is declared as global, the conflicts will be determined
based on the propagation rules of global arguments.</p>
<h6 id="panics-7" class="section-header"><a href="#panics-7">Panics</a></h6>
<p>If the given arg contains a conflict with an argument that is unknown to
this <code>Command</code>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.is_dont_delimit_trailing_values_set" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3526-3528" title="goto source code">[src]</a></div><a href="#method.is_dont_delimit_trailing_values_set" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.is_dont_delimit_trailing_values_set" class="fnname">is_dont_delimit_trailing_values_set</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a></h4></div></summary><div class="docblock"><p>Report whether <a href="struct.App.html#method.dont_delimit_trailing_values" title="Command::dont_delimit_trailing_values"><code>Command::dont_delimit_trailing_values</code></a> is set</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.is_disable_version_flag_set" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3531-3533" title="goto source code">[src]</a></div><a href="#method.is_disable_version_flag_set" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.is_disable_version_flag_set" class="fnname">is_disable_version_flag_set</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a></h4></div></summary><div class="docblock"><p>Report whether <a href="struct.App.html#method.disable_version_flag" title="Command::disable_version_flag"><code>Command::disable_version_flag</code></a> is set</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.is_propagate_version_set" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3536-3538" title="goto source code">[src]</a></div><a href="#method.is_propagate_version_set" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.is_propagate_version_set" class="fnname">is_propagate_version_set</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a></h4></div></summary><div class="docblock"><p>Report whether <a href="struct.App.html#method.propagate_version" title="Command::propagate_version"><code>Command::propagate_version</code></a> is set</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.is_next_line_help_set" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3541-3543" title="goto source code">[src]</a></div><a href="#method.is_next_line_help_set" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.is_next_line_help_set" class="fnname">is_next_line_help_set</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a></h4></div></summary><div class="docblock"><p>Report whether <a href="struct.App.html#method.next_line_help" title="Command::next_line_help"><code>Command::next_line_help</code></a> is set</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.is_disable_help_flag_set" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3546-3548" title="goto source code">[src]</a></div><a href="#method.is_disable_help_flag_set" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.is_disable_help_flag_set" class="fnname">is_disable_help_flag_set</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a></h4></div></summary><div class="docblock"><p>Report whether <a href="struct.App.html#method.disable_help_flag" title="Command::disable_help_flag"><code>Command::disable_help_flag</code></a> is set</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.is_disable_help_subcommand_set" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3551-3553" title="goto source code">[src]</a></div><a href="#method.is_disable_help_subcommand_set" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.is_disable_help_subcommand_set" class="fnname">is_disable_help_subcommand_set</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a></h4></div></summary><div class="docblock"><p>Report whether <a href="struct.App.html#method.disable_help_subcommand" title="Command::disable_help_subcommand"><code>Command::disable_help_subcommand</code></a> is set</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.is_disable_colored_help_set" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3556-3558" title="goto source code">[src]</a></div><a href="#method.is_disable_colored_help_set" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.is_disable_colored_help_set" class="fnname">is_disable_colored_help_set</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a></h4></div></summary><div class="docblock"><p>Report whether <a href="struct.App.html#method.disable_colored_help" title="Command::disable_colored_help"><code>Command::disable_colored_help</code></a> is set</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.is_dont_collapse_args_in_usage_set" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3567-3569" title="goto source code">[src]</a></div><a href="#method.is_dont_collapse_args_in_usage_set" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.is_dont_collapse_args_in_usage_set" class="fnname">is_dont_collapse_args_in_usage_set</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a></h4></div></summary><div class="docblock"><p>Report whether <a href="struct.App.html#method.dont_collapse_args_in_usage" title="Command::dont_collapse_args_in_usage"><code>Command::dont_collapse_args_in_usage</code></a> is set</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.is_arg_required_else_help_set" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3582-3584" title="goto source code">[src]</a></div><a href="#method.is_arg_required_else_help_set" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.is_arg_required_else_help_set" class="fnname">is_arg_required_else_help_set</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a></h4></div></summary><div class="docblock"><p>Report whether <a href="struct.App.html#method.arg_required_else_help" title="Command::arg_required_else_help"><code>Command::arg_required_else_help</code></a> is set</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.is_allow_negative_numbers_set" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3592-3594" title="goto source code">[src]</a></div><a href="#method.is_allow_negative_numbers_set" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.is_allow_negative_numbers_set" class="fnname">is_allow_negative_numbers_set</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a></h4></div></summary><div class="docblock"><p>Report whether <a href="struct.App.html#method.allow_negative_numbers" title="Command::allow_negative_numbers"><code>Command::allow_negative_numbers</code></a> is set</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.is_trailing_var_arg_set" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3597-3599" title="goto source code">[src]</a></div><a href="#method.is_trailing_var_arg_set" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.is_trailing_var_arg_set" class="fnname">is_trailing_var_arg_set</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a></h4></div></summary><div class="docblock"><p>Report whether <a href="struct.App.html#method.trailing_var_arg" title="Command::trailing_var_arg"><code>Command::trailing_var_arg</code></a> is set</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.is_allow_missing_positional_set" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3602-3604" title="goto source code">[src]</a></div><a href="#method.is_allow_missing_positional_set" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.is_allow_missing_positional_set" class="fnname">is_allow_missing_positional_set</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a></h4></div></summary><div class="docblock"><p>Report whether <a href="struct.App.html#method.allow_missing_positional" title="Command::allow_missing_positional"><code>Command::allow_missing_positional</code></a> is set</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.is_hide_set" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3607-3609" title="goto source code">[src]</a></div><a href="#method.is_hide_set" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.is_hide_set" class="fnname">is_hide_set</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a></h4></div></summary><div class="docblock"><p>Report whether <a href="struct.App.html#method.hide" title="Command::hide"><code>Command::hide</code></a> is set</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.is_subcommand_required_set" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3612-3614" title="goto source code">[src]</a></div><a href="#method.is_subcommand_required_set" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.is_subcommand_required_set" class="fnname">is_subcommand_required_set</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a></h4></div></summary><div class="docblock"><p>Report whether <a href="struct.App.html#method.subcommand_required" title="Command::subcommand_required"><code>Command::subcommand_required</code></a> is set</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.is_allow_external_subcommands_set" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3617-3619" title="goto source code">[src]</a></div><a href="#method.is_allow_external_subcommands_set" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.is_allow_external_subcommands_set" class="fnname">is_allow_external_subcommands_set</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a></h4></div></summary><div class="docblock"><p>Report whether <a href="struct.App.html#method.allow_external_subcommands" title="Command::allow_external_subcommands"><code>Command::allow_external_subcommands</code></a> is set</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.is_allow_invalid_utf8_for_external_subcommands_set" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3622-3624" title="goto source code">[src]</a></div><a href="#method.is_allow_invalid_utf8_for_external_subcommands_set" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.is_allow_invalid_utf8_for_external_subcommands_set" class="fnname">is_allow_invalid_utf8_for_external_subcommands_set</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a></h4></div></summary><div class="docblock"><p>Report whether <a href="struct.App.html#method.allow_invalid_utf8_for_external_subcommands" title="Command::allow_invalid_utf8_for_external_subcommands"><code>Command::allow_invalid_utf8_for_external_subcommands</code></a> is set</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.is_args_conflicts_with_subcommands_set" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3627-3629" title="goto source code">[src]</a></div><a href="#method.is_args_conflicts_with_subcommands_set" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.is_args_conflicts_with_subcommands_set" class="fnname">is_args_conflicts_with_subcommands_set</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a></h4></div></summary><div class="docblock"><p>Report whether <a href="struct.App.html#method.args_conflicts_with_subcommands" title="Command::args_conflicts_with_subcommands"><code>Command::args_conflicts_with_subcommands</code></a> is set</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.is_subcommand_precedence_over_arg_set" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3632-3634" title="goto source code">[src]</a></div><a href="#method.is_subcommand_precedence_over_arg_set" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.is_subcommand_precedence_over_arg_set" class="fnname">is_subcommand_precedence_over_arg_set</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a></h4></div></summary><div class="docblock"><p>Report whether <a href="struct.App.html#method.subcommand_precedence_over_arg" title="Command::subcommand_precedence_over_arg"><code>Command::subcommand_precedence_over_arg</code></a> is set</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.is_subcommand_negates_reqs_set" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#3637-3639" title="goto source code">[src]</a></div><a href="#method.is_subcommand_negates_reqs_set" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.is_subcommand_negates_reqs_set" class="fnname">is_subcommand_negates_reqs_set</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a></h4></div></summary><div class="docblock"><p>Report whether <a href="struct.App.html#method.subcommand_negates_reqs" title="Command::subcommand_negates_reqs"><code>Command::subcommand_negates_reqs</code></a> is set</p>
</div></details></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Clone" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#74" title="goto source code">[src]</a></div><a href="#impl-Clone" class="anchor"></a><h3 class="code-header in-band">impl&lt;'help&gt; <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.App.html" title="struct clap::App">App</a>&lt;'help&gt;</h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#74" title="goto source code">[src]</a></div><a href="#method.clone" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.59.0/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&amp;self) -&gt; <a class="struct" href="struct.App.html" title="struct clap::App">App</a>&lt;'help&gt;</h4></div></summary><div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.59.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone_from" class="method trait-impl has-srclink"><div class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/clone.rs.html#130" title="goto source code">[src]</a></div><a href="#method.clone_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.59.0/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.reference.html">&amp;</a>Self)</h4></div></summary><div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.59.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Debug" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#74" title="goto source code">[src]</a></div><a href="#impl-Debug" class="anchor"></a><h3 class="code-header in-band">impl&lt;'help&gt; <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.App.html" title="struct clap::App">App</a>&lt;'help&gt;</h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.fmt-1" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#74" title="goto source code">[src]</a></div><a href="#method.fmt-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.59.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/1.59.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/1.59.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></div></summary><div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.59.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Default" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#4668-4707" title="goto source code">[src]</a></div><a href="#impl-Default" class="anchor"></a><h3 class="code-header in-band">impl&lt;'help&gt; <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.App.html" title="struct clap::App">App</a>&lt;'help&gt;</h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.default" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#4669-4706" title="goto source code">[src]</a></div><a href="#method.default" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.59.0/core/default/trait.Default.html#tymethod.default" class="fnname">default</a>() -&gt; Self</h4></div></summary><div class='docblock'><p>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.59.0/core/default/trait.Default.html#tymethod.default">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Display" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#4717-4721" title="goto source code">[src]</a></div><a href="#impl-Display" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="struct" href="struct.App.html" title="struct clap::App">App</a>&lt;'_&gt;</h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.fmt" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#4718-4720" title="goto source code">[src]</a></div><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.59.0/core/fmt/trait.Display.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/1.59.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/1.59.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></div></summary><div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.59.0/core/fmt/trait.Display.html#tymethod.fmt">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-PartialEq%3CApp%3C%27help%3E%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#74" title="goto source code">[src]</a></div><a href="#impl-PartialEq%3CApp%3C%27help%3E%3E" class="anchor"></a><h3 class="code-header in-band">impl&lt;'help&gt; <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="struct.App.html" title="struct clap::App">App</a>&lt;'help&gt;&gt; for <a class="struct" href="struct.App.html" title="struct clap::App">App</a>&lt;'help&gt;</h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.eq" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#74" title="goto source code">[src]</a></div><a href="#method.eq" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.59.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&amp;self, other: &amp;<a class="struct" href="struct.App.html" title="struct clap::App">App</a>&lt;'help&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a></h4></div></summary><div class='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
by <code>==</code>. <a href="https://doc.rust-lang.org/1.59.0/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.ne" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#74" title="goto source code">[src]</a></div><a href="#method.ne" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.59.0/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&amp;self, other: &amp;<a class="struct" href="struct.App.html" title="struct clap::App">App</a>&lt;'help&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a></h4></div></summary><div class='docblock'><p>This method tests for <code>!=</code>.</p>
</div></details></div></details><div id="impl-Eq" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#74" title="goto source code">[src]</a></div><a href="#impl-Eq" class="anchor"></a><h3 class="code-header in-band">impl&lt;'help&gt; <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="struct" href="struct.App.html" title="struct clap::App">App</a>&lt;'help&gt;</h3></div><div id="impl-StructuralEq" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#74" title="goto source code">[src]</a></div><a href="#impl-StructuralEq" class="anchor"></a><h3 class="code-header in-band">impl&lt;'help&gt; <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/marker/trait.StructuralEq.html" title="trait core::marker::StructuralEq">StructuralEq</a> for <a class="struct" href="struct.App.html" title="struct clap::App">App</a>&lt;'help&gt;</h3></div><div id="impl-StructuralPartialEq" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/build/command.rs.html#74" title="goto source code">[src]</a></div><a href="#impl-StructuralPartialEq" class="anchor"></a><h3 class="code-header in-band">impl&lt;'help&gt; <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="struct" href="struct.App.html" title="struct clap::App">App</a>&lt;'help&gt;</h3></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><div id="impl-RefUnwindSafe" class="impl has-srclink"><div class="rightside"></div><a href="#impl-RefUnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl&lt;'help&gt; <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.App.html" title="struct clap::App">App</a>&lt;'help&gt;</h3></div><div id="impl-Send" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Send" class="anchor"></a><h3 class="code-header in-band">impl&lt;'help&gt; <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.App.html" title="struct clap::App">App</a>&lt;'help&gt;</h3></div><div id="impl-Sync" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Sync" class="anchor"></a><h3 class="code-header in-band">impl&lt;'help&gt; <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.App.html" title="struct clap::App">App</a>&lt;'help&gt;</h3></div><div id="impl-Unpin" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Unpin" class="anchor"></a><h3 class="code-header in-band">impl&lt;'help&gt; <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.App.html" title="struct clap::App">App</a>&lt;'help&gt;</h3></div><div id="impl-UnwindSafe" class="impl has-srclink"><div class="rightside"></div><a href="#impl-UnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl&lt;'help&gt; <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.App.html" title="struct clap::App">App</a>&lt;'help&gt;</h3></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Any" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/any.rs.html#132-136" title="goto source code">[src]</a></div><a href="#impl-Any" class="anchor"></a><h3 class="code-header in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.59.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.type_id" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/any.rs.html#133" title="goto source code">[src]</a></div><a href="#method.type_id" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.59.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.59.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></div></summary><div class='docblock'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.59.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Borrow%3CT%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/borrow.rs.html#209-214" title="goto source code">[src]</a></div><a href="#impl-Borrow%3CT%3E" class="anchor"></a><h3 class="code-header in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/1.59.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/borrow.rs.html#211" title="goto source code">[src]</a></div><a href="#method.borrow" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.59.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.reference.html">&amp;</a>T</h4></div></summary><div class='docblock'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.59.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-BorrowMut%3CT%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/borrow.rs.html#218-222" title="goto source code">[src]</a></div><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><h3 class="code-header in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/1.59.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow_mut" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/borrow.rs.html#219" title="goto source code">[src]</a></div><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.59.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.reference.html">&amp;mut </a>T</h4></div></summary><div class='docblock'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.59.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Equivalent%3CK%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/indexmap/equivalent.rs.html#18-27" title="goto source code">[src]</a></div><a href="#impl-Equivalent%3CK%3E" class="anchor"></a><h3 class="code-header in-band">impl&lt;Q, K&gt; <a class="trait" href="../indexmap/equivalent/trait.Equivalent.html" title="trait indexmap::equivalent::Equivalent">Equivalent</a>&lt;K&gt; for Q <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Q: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.59.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;K: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;Q&gt; + ?<a class="trait" href="https://doc.rust-lang.org/1.59.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.equivalent" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/indexmap/equivalent.rs.html#24" title="goto source code">[src]</a></div><a href="#method.equivalent" class="anchor"></a><h4 class="code-header">pub fn <a href="../indexmap/equivalent/trait.Equivalent.html#tymethod.equivalent" class="fnname">equivalent</a>(&amp;self, key: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.reference.html">&amp;</a>K) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a></h4></div></summary><div class='docblock'><p>Compare self to <code>key</code> and return <code>true</code> if they are equal.</p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-From%3CT%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/convert/mod.rs.html#550-554" title="goto source code">[src]</a></div><a href="#impl-From%3CT%3E" class="anchor"></a><h3 class="code-header in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.from" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/convert/mod.rs.html#551" title="goto source code">[src]</a></div><a href="#method.from" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.59.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -&gt; T</h4></div></summary><div class='docblock'><p>Performs the conversion.</p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Into%3CU%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/convert/mod.rs.html#538-545" title="goto source code">[src]</a></div><a href="#impl-Into%3CU%3E" class="anchor"></a><h3 class="code-header in-band">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,&nbsp;</span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.into" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/convert/mod.rs.html#542" title="goto source code">[src]</a></div><a href="#method.into" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -&gt; U</h4></div></summary><div class='docblock'><p>Performs the conversion.</p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-ToOwned" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/alloc/borrow.rs.html#84-96" title="goto source code">[src]</a></div><a href="#impl-ToOwned" class="anchor"></a><h3 class="code-header in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.59.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,&nbsp;</span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Owned" class="type trait-impl has-srclink"><a href="#associatedtype.Owned" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.59.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></div></summary><div class='docblock'><p>The resulting type after obtaining ownership.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.to_owned" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/alloc/borrow.rs.html#89" title="goto source code">[src]</a></div><a href="#method.to_owned" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.59.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fnname">to_owned</a>(&amp;self) -&gt; T</h4></div></summary><div class='docblock'><p>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.59.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone_into" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/alloc/borrow.rs.html#93" title="goto source code">[src]</a></div><a href="#method.clone_into" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.59.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fnname">clone_into</a>(&amp;self, target: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.reference.html">&amp;mut </a>T)</h4></div></summary><div class="item-info"><div class="stab unstable"><span class="emoji">🔬</span> This is a nightly-only experimental API. (<code>toowned_clone_into</code>)</div></div><div class='docblock'><p>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.59.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-ToString" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/alloc/string.rs.html#2388-2402" title="goto source code">[src]</a></div><a href="#impl-ToString" class="anchor"></a><h3 class="code-header in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.59.0/alloc/string/trait.ToString.html" title="trait alloc::string::ToString">ToString</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.59.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.to_string" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/alloc/string.rs.html#2394" title="goto source code">[src]</a></div><a href="#method.to_string" class="anchor"></a><h4 class="code-header">pub default fn <a href="https://doc.rust-lang.org/1.59.0/alloc/string/trait.ToString.html#tymethod.to_string" class="fnname">to_string</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></div></summary><div class='docblock'><p>Converts the given value to a <code>String</code>. <a href="https://doc.rust-lang.org/1.59.0/alloc/string/trait.ToString.html#tymethod.to_string">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-TryFrom%3CU%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/convert/mod.rs.html#588-597" title="goto source code">[src]</a></div><a href="#impl-TryFrom%3CU%3E" class="anchor"></a><h3 class="code-header in-band">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,&nbsp;</span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Error-1" class="type trait-impl has-srclink"><a href="#associatedtype.Error-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.59.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></div></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_from" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/convert/mod.rs.html#594" title="goto source code">[src]</a></div><a href="#method.try_from" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.59.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></div></summary><div class='docblock'><p>Performs the conversion.</p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-TryInto%3CU%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/convert/mod.rs.html#574-583" title="goto source code">[src]</a></div><a href="#impl-TryInto%3CU%3E" class="anchor"></a><h3 class="code-header in-band">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,&nbsp;</span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Error" class="type trait-impl has-srclink"><a href="#associatedtype.Error" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.59.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></div></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_into" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/convert/mod.rs.html#580" title="goto source code">[src]</a></div><a href="#method.try_into" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.59.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></div></summary><div class='docblock'><p>Performs the conversion.</p>
</div></details></div></details></div></section><section id="search" class="content hidden"></section></div></main><div id="rustdoc-vars" data-root-path="../" data-current-crate="clap" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.59.0 (9d1b2106e 2022-02-23)" ></div>
</body></html>