<!DOCTYPE html><htmllang="en"><head><metacharset="utf-8"><metaname="viewport"content="width=device-width, initial-scale=1.0"><metaname="generator"content="rustdoc"><metaname="description"content="The abstract representation of a command line argument. Used to set all the options and relationships that define a valid argument for the program."><title>Arg in clap_builder::builder - Rust</title><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><linkrel="stylesheet"href="../../static.files/normalize-76eba96aa4d2e634.css"><linkrel="stylesheet"href="../../static.files/rustdoc-ac92e1bbe349e143.css"><metaname="rustdoc-vars"data-root-path="../../"data-static-root-path="../../static.files/"data-current-crate="clap_builder"data-themes=""data-resource-suffix=""data-rustdoc-version="1.76.0 (07dca489a 2024-02-04)"data-channel="1.76.0"data-search-js="search-2b6ce74ff89ae146.js"data-settings-js="settings-4313503d2e1961c2.js"><scriptsrc="../../static.files/storage-f2adc0d6ca4d09fb.js"></script><scriptdefersrc="sidebar-items.js"></script><scriptdefersrc="../../static.files/main-305769736d49e732.js"></script><noscript><linkrel="stylesheet"href="../../static.files/noscript-feafe1bb7466e4bd.css"></noscript><linkrel="alternate icon"type="image/png"href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><linkrel="alternate icon"type="image/png"href="../../static.files/favicon-32x32-422f7d1d52889060.png"><linkrel="icon"type="image/svg+xml"href="../../static.files/favicon-2c020d218678b618.svg"></head><bodyclass="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><navclass="mobile-topbar"><buttonclass="sidebar-menu-toggle">☰</button><aclass="logo-container"href="../../clap_builder/index.html"><imgsrc="https://raw.githubusercontent.com/clap-rs/clap/master/assets/clap.png"alt=""></a></nav><navclass="sidebar"><divclass="sidebar-crate"><aclass="logo-container"href="../../clap_builder/index.html"><imgsrc="https://raw.githubusercontent.com/clap-rs/clap/master/assets/clap.png"alt="logo"></a><h2><ahref="../../clap_builder/index.html">clap_builder</a><spanclass="version">4.5.1</span></h2></div><h2class="location"><ahref="#">Arg</a></h2><divclass="sidebar-elems"><section><h3><ahref="#implementations">Methods</a></h3><ulclass="block method"><li><ahref="#method.action">action</a></li><li><ahref="#method.alias">alias</a></li><li><ahref="#method.aliases">aliases</a></li><li><ahref="#method.allow_hyphen_values">allow_hyphen_values</a></li><li><ahref="#method.allow_negative_numbers">allow_negative_numbers</a></li><li><ahref="#method.conflicts_with">conflicts_with</a></li><li><ahref="#method.conflicts_with_all">conflicts_with_all</a></li><li><ahref="#method.default_missing_value">default_missing_value</a></li><li><ahref="#method.default_missing_value_os">default_missing_value_os</a></li><li><ahref="#method.default_missing_values">default_missing_values</a></li><li><ahref="#method.default_missing_values_os">default_missing_values_os</a></li><li><ahref="#method.default_value">default_value</a></li><li><ahref="#method.default_value_if">default_value_if</a></li><li><ahref="#method.default_value_ifs">default_value_ifs</a></li><li><ahref="#method.default_values">default_values</a></li><li><ahref="#method.display_order">display_order</a></li><li><ahref="#method.exclusive">exclusive</a></li><li>
<main><divclass="width-limiter"><navclass="sub"><formclass="search-form"><span></span><divid="sidebar-button"tabindex="-1"><ahref="../../clap_builder/all.html"title="show sidebar"></a></div><inputclass="search-input"name="search"aria-label="Run search in the documentation"autocomplete="off"spellcheck="false"placeholder="Click or press ‘S’ to search, ‘?’ for more options…"type="search"><divid="help-button"tabindex="-1"><ahref="../../help.html"title="help">?</a></div><divid="settings-menu"tabindex="-1"><ahref="../../settings.html"title="settings"><imgwidth="22"height="22"alt="Change settings"src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><sectionid="main-content"class="content"><divclass="main-heading"><h1>Struct <ahref="../index.html">clap_builder</a>::<wbr><ahref="index.html">builder</a>::<wbr><aclass="struct"href="#">Arg</a><buttonid="copy-path"title="Copy item path to clipboard"><imgsrc="../../static.files/clipboard-7571035ce49a181d.svg"width="19"height="18"alt="Copy item path"></button></h1><spanclass="out-of-band"><aclass="src"href="../../src/clap_builder/builder/arg.rs.html#57-89">source</a> · <buttonid="toggle-all-docs"title="collapse all docs">[<span>−</span>]</button></span></div><preclass="rust item-decl"><code>pub struct Arg { <spanclass="comment">/* private fields */</span> }</code></pre><detailsclass="toggle top-doc"open><summaryclass="hideme"><span>Expand description</span></summary><divclass="docblock"><p>The abstract representation of a command line argument. Used to set all the options and
relationships that define a valid argument for the program.</p>
<p>There are two methods for constructing <ahref="struct.Arg.html"title="struct clap_builder::builder::Arg"><code>Arg</code></a>s, using the builder pattern and setting options
manually, or using a usage string which is far less verbose but has fewer options. You can also
use a combination of the two methods to achieve the best of both worlds.</p>
<divclass="example-wrap"><preclass="rust rust-example-rendered"><code><spanclass="comment">// Using the traditional builder pattern and setting each option manually
.help(<spanclass="string">"Provides a config file to myprog"</span>);
<spanclass="comment">// Using a usage string (setting a similar argument to the one above)
</span><spanclass="kw">let </span>input = <spanclass="macro">arg!</span>(-i --input <FILE><spanclass="string">"Provides an input file to the program"</span>);</code></pre></div>
</div></details><h2id="implementations"class="section-header">Implementations<ahref="#implementations"class="anchor">§</a></h2><divid="implementations-list"><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-Arg"class="impl"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#92-872">source</a><ahref="#impl-Arg"class="anchor">§</a><h3class="code-header">impl <aclass="struct"href="struct.Arg.html"title="struct clap_builder::builder::Arg">Arg</a></h3></section></summary><divclass="docblock"><h4id="basic-api"><ahref="#basic-api">Basic API</a></h4></div><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.new"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#111-113">source</a><h4class="code-header">pub fn <ahref="#method.new"class="fn">new</a>(id: impl <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><<aclass="struct"href="../struct.Id.html"title="struct clap_builder::Id">Id</a>>) -> Self</h4></section></summary><divclass="docblock"><p>Create a new <ahref="struct.Arg.html"title="struct clap_builder::builder::Arg"><code>Arg</code></a> with a unique name.</p>
<p>The name is used to check whether or not the argument was used at
runtime, get values, set relationships with other args, etc..</p>
<p><strong>NOTE:</strong> In the case of arguments that take values (i.e. <ahref="struct.Arg.html#method.action"title="method clap_builder::builder::Arg::action"><code>Arg::action(ArgAction::Set)</code></a>)
and positional arguments (i.e. those without a preceding <code>-</code> or <code>--</code>) the name will also
be displayed when the user prints the usage/help information of the program.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.id"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#119-122">source</a><h4class="code-header">pub fn <ahref="#method.id"class="fn">id</a>(self, id: impl <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><<aclass="struct"href="../struct.Id.html"title="struct clap_builder::Id">Id</a>>) -> Self</h4></section></summary><divclass="docblock"><p>Set the identifier used for referencing this argument in the clap API.</p>
<p>See <ahref="struct.Arg.html#method.new"title="associated function clap_builder::builder::Arg::new"><code>Arg::new</code></a> for more details.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.short"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#171-179">source</a><h4class="code-header">pub fn <ahref="#method.short"class="fn">short</a>(self, s: impl <aclass="trait"href="trait.IntoResettable.html"title="trait clap_builder::builder::IntoResettable">IntoResettable</a><<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.char.html">char</a>>) -> Self</h4></section></summary><divclass="docblock"><p>Sets the short version of the argument without the preceding <code>-</code>.</p>
<p>By default <code>V</code> and <code>h</code> are used by the auto-generated <code>version</code> and <code>help</code> arguments,
respectively. You will need to disable the auto-generated flags
<ahref="struct.Command.html#method.disable_version_flag"title="method clap_builder::builder::Command::disable_version_flag"><code>disable_version_flag</code></a>) and define your own.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.long"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#213-216">source</a><h4class="code-header">pub fn <ahref="#method.long"class="fn">long</a>(self, l: impl <aclass="trait"href="trait.IntoResettable.html"title="trait clap_builder::builder::IntoResettable">IntoResettable</a><<aclass="struct"href="struct.Str.html"title="struct clap_builder::builder::Str">Str</a>>) -> Self</h4></section></summary><divclass="docblock"><p>Sets the long version of the argument without the preceding <code>--</code>.</p>
<p>By default <code>version</code> and <code>help</code> are used by the auto-generated <code>version</code> and <code>help</code>
arguments, respectively. You may use the word <code>version</code> or <code>help</code> for the long form of your
own arguments, in which case <code>clap</code> simply will not assign those to the auto-generated
<code>version</code> or <code>help</code> arguments.</p>
<p><strong>NOTE:</strong> Any leading <code>-</code> characters will be stripped</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.alias"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#239-246">source</a><h4class="code-header">pub fn <ahref="#method.alias"class="fn">alias</a>(self, name: impl <aclass="trait"href="trait.IntoResettable.html"title="trait clap_builder::builder::IntoResettable">IntoResettable</a><<aclass="struct"href="struct.Str.html"title="struct clap_builder::builder::Str">Str</a>>) -> Self</h4></section></summary><divclass="docblock"><p>Add an alias, which functions as a hidden long flag.</p>
<p>This is more efficient, and easier than creating multiple hidden arguments as one only
needs to check for the existence of this command, and not all variants.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.short_alias"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#269-277">source</a><h4class="code-header">pub fn <ahref="#method.short_alias"class="fn">short_alias</a>(self, name: impl <aclass="trait"href="trait.IntoResettable.html"title="trait clap_builder::builder::IntoResettable">IntoResettable</a><<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.char.html">char</a>>) -> Self</h4></section></summary><divclass="docblock"><p>Add an alias, which functions as a hidden short flag.</p>
<p>This is more efficient, and easier than creating multiple hidden arguments as one only
needs to check for the existence of this command, and not all variants.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.visible_alias"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#360-367">source</a><h4class="code-header">pub fn <ahref="#method.visible_alias"class="fn">visible_alias</a>(self, name: impl <aclass="trait"href="trait.IntoResettable.html"title="trait clap_builder::builder::IntoResettable">IntoResettable</a><<aclass="struct"href="struct.Str.html"title="struct clap_builder::builder::Str">Str</a>>) -> Self</h4></section></summary><divclass="docblock"><p>Add an alias, which functions as a visible long flag.</p>
<p>Like <ahref="struct.Arg.html#method.alias"title="method clap_builder::builder::Arg::alias"><code>Arg::alias</code></a>, except that they are visible inside the help message.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.visible_short_alias"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#389-397">source</a><h4class="code-header">pub fn <ahref="#method.visible_short_alias"class="fn">visible_short_alias</a>(self, name: impl <aclass="trait"href="trait.IntoResettable.html"title="trait clap_builder::builder::IntoResettable">IntoResettable</a><<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.char.html">char</a>>) -> Self</h4></section></summary><divclass="docblock"><p>Add an alias, which functions as a visible short flag.</p>
<p>Like <ahref="struct.Arg.html#method.short_alias"title="method clap_builder::builder::Arg::short_alias"><code>Arg::short_alias</code></a>, except that they are visible inside the help message.</p>
) -> Self</h4></section></summary><divclass="docblock"><p>Add aliases, which function as visible long flags.</p>
<p>Like <ahref="struct.Arg.html#method.aliases"title="method clap_builder::builder::Arg::aliases"><code>Arg::aliases</code></a>, except that they are visible inside the help message.</p>
) -> Self</h4></section></summary><divclass="docblock"><p>Add aliases, which function as visible short flags.</p>
<p>Like <ahref="struct.Arg.html#method.short_aliases"title="method clap_builder::builder::Arg::short_aliases"><code>Arg::short_aliases</code></a>, except that they are visible inside the help message.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.index"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#508-511">source</a><h4class="code-header">pub fn <ahref="#method.index"class="fn">index</a>(self, idx: impl <aclass="trait"href="trait.IntoResettable.html"title="trait clap_builder::builder::IntoResettable">IntoResettable</a><<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>>) -> Self</h4></section></summary><divclass="docblock"><p>Specifies the index of a positional argument <strong>starting at</strong> 1.</p>
<p><strong>NOTE:</strong> The index refers to position according to <strong>other positional argument</strong>. It does
not define position in the argument list as a whole.</p>
<p><strong>NOTE:</strong> You can optionally leave off the <code>index</code> method, and the index will be
assigned in order of evaluation. Utilizing the <code>index</code> method allows for setting
indexes out of order</p>
<p><strong>NOTE:</strong> This is only meant to be used for positional arguments and shouldn’t to be used
with <ahref="struct.Arg.html#method.short"title="method clap_builder::builder::Arg::short"><code>Arg::short</code></a> or <ahref="struct.Arg.html#method.long"title="method clap_builder::builder::Arg::long"><code>Arg::long</code></a>.</p>
<p><strong>NOTE:</strong> When utilized with [<code>Arg::num_args(1..)</code>], only the <strong>last</strong> positional argument
may be defined as having a variable number of arguments (i.e. with the highest index)</p>
<h5id="panics"><ahref="#panics">Panics</a></h5>
<p><ahref="struct.Command.html"title="struct clap_builder::builder::Command"><code>Command</code></a> will <ahref="https://doc.rust-lang.org/1.76.0/std/macro.panic.html"title="macro std::panic"><code>panic!</code></a> if indexes are skipped (such as defining <code>index(1)</code> and <code>index(3)</code>
but not <code>index(2)</code>, or a positional argument is defined as multiple and is not the highest
<spanclass="macro">assert_eq!</span>(m.get_one::<String>(<spanclass="string">"mode"</span>).unwrap(), <spanclass="string">"fast"</span>); <spanclass="comment">// notice index(1) means "first positional"
// *not* first argument</span></code></pre></div>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.trailing_var_arg"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#537-543">source</a><h4class="code-header">pub fn <ahref="#method.trailing_var_arg"class="fn">trailing_var_arg</a>(self, yes: <aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.bool.html">bool</a>) -> Self</h4></section></summary><divclass="docblock"><p>This is a “VarArg” and everything that follows should be captured by it, as if the user had
used a <code>--</code>.</p>
<p><strong>NOTE:</strong> To start the trailing “VarArg” on unknown flags (and not just a positional
value), set <ahref="struct.Arg.html#method.allow_hyphen_values"title="method clap_builder::builder::Arg::allow_hyphen_values"><code>allow_hyphen_values</code></a>. Either way, users still
have the option to explicitly escape ambiguous arguments with <code>--</code>.</p>
<p><strong>NOTE:</strong><ahref="struct.Arg.html#method.value_delimiter"title="method clap_builder::builder::Arg::value_delimiter"><code>Arg::value_delimiter</code></a> still applies if set.</p>
<p><strong>NOTE:</strong> Setting this requires <ahref="struct.Arg.html#method.num_args"title="method clap_builder::builder::Arg::num_args"><code>Arg::num_args(..)</code></a>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.last"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#626-632">source</a><h4class="code-header">pub fn <ahref="#method.last"class="fn">last</a>(self, yes: <aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.bool.html">bool</a>) -> Self</h4></section></summary><divclass="docblock"><p>This arg is the last, or final, positional argument (i.e. has the highest
index) and is <em>only</em> able to be accessed via the <code>--</code> syntax (i.e. <code>$ prog args -- last_arg</code>).</p>
<p>Even, if no other arguments are left to parse, if the user omits the <code>--</code> syntax
they will receive an <ahref="../error/enum.ErrorKind.html#variant.UnknownArgument"title="variant clap_builder::error::ErrorKind::UnknownArgument"><code>UnknownArgument</code></a> error. Setting an argument to <code>.last(true)</code> also
allows one to access this arg early using the <code>--</code> syntax. Accessing an arg early, even with
the <code>--</code> syntax is otherwise not possible.</p>
<p><strong>NOTE:</strong> This will change the usage string to look like <code>$ prog [OPTIONS] [-- <ARG>]</code> if
<code>ARG</code> is marked as <code>.last(true)</code>.</p>
<p><strong>NOTE:</strong> This setting will imply <ahref="struct.Command.html#method.dont_collapse_args_in_usage"title="method clap_builder::builder::Command::dont_collapse_args_in_usage"><code>crate::Command::dont_collapse_args_in_usage</code></a> because failing
to set this can make the usage string very confusing.</p>
<p><strong>NOTE</strong>: This setting only applies to positional arguments, and has no effect on OPTIONS</p>
<p><strong>NOTE:</strong> Setting this requires <ahref="struct.Arg.html#method.num_args"title="method clap_builder::builder::Arg::num_args">taking values</a></p>
<p><strong>CAUTION:</strong> Using this setting <em>and</em> having child subcommands is not
recommended with the exception of <em>also</em> using
(or <ahref="struct.Command.html#method.subcommand_negates_reqs"title="method clap_builder::builder::Command::subcommand_negates_reqs"><code>crate::Command::subcommand_negates_reqs</code></a> if the argument marked <code>Last</code> is also
<p>Setting <code>last</code> ensures the arg has the highest <ahref="struct.Arg.html#method.index"title="method clap_builder::builder::Arg::index">index</a> of all positional args
and requires that the <code>--</code> syntax be used to access it early.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.required"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#692-698">source</a><h4class="code-header">pub fn <ahref="#method.required"class="fn">required</a>(self, yes: <aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.bool.html">bool</a>) -> Self</h4></section></summary><divclass="docblock"><p>Specifies that the argument must be present.</p>
<p>Required by default means it is required, when no other conflicting rules or overrides have
been evaluated. Conflicting rules take precedence over being required.</p>
<p><strong>Pro tip:</strong> Flags (i.e. not positional, or arguments that take values) shouldn’t be
required by default. This is because if a flag were to be required, it should simply be
implied. No additional information is required from user. Flags by their very nature are
simply boolean on/off switches. The only time a user <em>should</em> be required to use a flag
is if the operation is destructive in nature, and the user is essentially proving to you,
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.requires"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#758-765">source</a><h4class="code-header">pub fn <ahref="#method.requires"class="fn">requires</a>(self, arg_id: impl <aclass="trait"href="trait.IntoResettable.html"title="trait clap_builder::builder::IntoResettable">IntoResettable</a><<aclass="struct"href="../struct.Id.html"title="struct clap_builder::Id">Id</a>>) -> Self</h4></section></summary><divclass="docblock"><p>Sets an argument that is required when this one is present</p>
<p>i.e. when using this argument, the following argument <em>must</em> be present.</p>
<p><strong>NOTE:</strong><ahref="struct.Arg.html#method.conflicts_with"title="method clap_builder::builder::Arg::conflicts_with">Conflicting</a> rules and <ahref="struct.Arg.html#method.overrides_with"title="method clap_builder::builder::Arg::overrides_with">override</a> rules take precedence over being required</p>
<p>Setting <ahref="struct.Arg.html#method.requires"title="method clap_builder::builder::Arg::requires"><code>Arg::requires(name)</code></a> requires that the argument be used at runtime if the
defining argument is used. If the defining argument isn’t used, the other argument isn’t
<spanclass="macro">assert!</span>(res.is_ok()); <spanclass="comment">// We didn't use cfg, so input wasn't required</span></code></pre></div>
<p>Setting <ahref="struct.Arg.html#method.requires"title="method clap_builder::builder::Arg::requires"><code>Arg::requires(name)</code></a> and <em>not</em> supplying that argument is an error.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.exclusive"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#802-808">source</a><h4class="code-header">pub fn <ahref="#method.exclusive"class="fn">exclusive</a>(self, yes: <aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.bool.html">bool</a>) -> Self</h4></section></summary><divclass="docblock"><p>This argument must be passed alone; it conflicts with all other arguments.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.global"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#846-852">source</a><h4class="code-header">pub fn <ahref="#method.global"class="fn">global</a>(self, yes: <aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.bool.html">bool</a>) -> Self</h4></section></summary><divclass="docblock"><p>Specifies that an argument can be matched to all child <ahref="../trait.Subcommand.html"title="trait clap_builder::Subcommand"><code>Subcommand</code></a>s.</p>
<p><strong>NOTE:</strong> Global arguments <em>only</em> propagate down, <strong>not</strong> up (to parent commands), however
their values once a user uses them will be propagated back up to parents. In effect, this
means one should <em>define</em> all global arguments at the top level, however it doesn’t matter
where the user <em>uses</em> the global argument.</p>
<p>Assume an application with two subcommands, and you’d like to define a
<code>--verbose</code> flag that can be called on any of the subcommands and parent, but you don’t
want to clutter the source with three duplicate <ahref="struct.Arg.html"title="struct clap_builder::builder::Arg"><code>Arg</code></a> definitions.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.value_parser"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#969-972">source</a><h4class="code-header">pub fn <ahref="#method.value_parser"class="fn">value_parser</a>(self, parser: impl <aclass="trait"href="trait.IntoResettable.html"title="trait clap_builder::builder::IntoResettable">IntoResettable</a><<aclass="struct"href="struct.ValueParser.html"title="struct clap_builder::builder::ValueParser">ValueParser</a>>) -> Self</h4></section></summary><divclass="docblock"><p>Specify the typed behavior of the argument.</p>
<p>This allows parsing and validating a value before storing it into
<ahref="../parser/struct.ArgMatches.html"title="struct clap_builder::parser::ArgMatches"><code>ArgMatches</code></a> as the given type.</p>
<p>Possible value parsers include:</p>
<ul>
<li><ahref="../macro.value_parser.html"title="macro clap_builder::value_parser"><code>value_parser!(T)</code></a> for auto-selecting a value parser for a given type
<ul>
<li>Or <ahref="https://doc.rust-lang.org/1.76.0/core/ops/range/trait.RangeBounds.html"title="trait core::ops::range::RangeBounds">range expressions like <code>0..=1</code></a> as a shorthand for <ahref="struct.RangedI64ValueParser.html"title="struct clap_builder::builder::RangedI64ValueParser"><code>RangedI64ValueParser</code></a></li>
<li><code>[&str]</code> and <ahref="struct.PossibleValuesParser.html"title="struct clap_builder::builder::PossibleValuesParser"><code>PossibleValuesParser</code></a> for static enumerated values</li>
<li><ahref="struct.BoolishValueParser.html"title="struct clap_builder::builder::BoolishValueParser"><code>BoolishValueParser</code></a>, and <ahref="struct.FalseyValueParser.html"title="struct clap_builder::builder::FalseyValueParser"><code>FalseyValueParser</code></a> for alternative <code>bool</code> implementations</li>
<li><ahref="struct.NonEmptyStringValueParser.html"title="struct clap_builder::builder::NonEmptyStringValueParser"><code>NonEmptyStringValueParser</code></a> for basic validation for strings</li>
<li>or any other <ahref="trait.TypedValueParser.html"title="trait clap_builder::builder::TypedValueParser"><code>TypedValueParser</code></a> implementation</li>
</ul>
<p>The default value is <ahref="struct.ValueParser.html#method.string"title="associated function clap_builder::builder::ValueParser::string"><code>ValueParser::string</code></a>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.num_args"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#1126-1129">source</a><h4class="code-header">pub fn <ahref="#method.num_args"class="fn">num_args</a>(self, qty: impl <aclass="trait"href="trait.IntoResettable.html"title="trait clap_builder::builder::IntoResettable">IntoResettable</a><<aclass="struct"href="struct.ValueRange.html"title="struct clap_builder::builder::ValueRange">ValueRange</a>>) -> Self</h4></section></summary><divclass="docblock"><p>Specifies the number of arguments parsed per occurrence</p>
<p>For example, if you had a <code>-f <file></code> argument where you wanted exactly 3 ‘files’ you would
set <code>.num_args(3)</code>, and this argument wouldn’t be satisfied unless the user
provided 3 and only 3 values.</p>
<p>Users may specify values for arguments in any of the following methods</p>
<ul>
<li>Using a space such as <code>-o value</code> or <code>--option value</code></li>
<li>Using an equals and no space such as <code>-o=value</code> or <code>--option=value</code></li>
<li>Use a short and no space such as <code>-ovalue</code></li>
</ul>
<p><strong>WARNING:</strong></p>
<p>Setting a variable number of values (e.g. <code>1..=10</code>) for an argument without
other details can be dangerous in some circumstances. Because multiple values are
allowed, <code>--option val1 val2 val3</code> is perfectly valid. Be careful when designing a CLI
where <strong>positional arguments</strong> or <strong>subcommands</strong> are <em>also</em> expected as <code>clap</code> will continue
parsing <em>values</em> until one of the following happens:</p>
<ul>
<li>It reaches the maximum number of values</li>
<li>It reaches a specific number of values</li>
<li>It finds another flag or option (i.e. something that starts with a <code>-</code>)</li>
<li>It reaches the <ahref="struct.Arg.html#method.value_terminator"title="method clap_builder::builder::Arg::value_terminator"><code>Arg::value_terminator</code></a> if set</li>
</ul>
<p>Alternatively,</p>
<ul>
<li>Use a delimiter between values with <ahref="struct.Arg.html#method.value_delimiter"title="method clap_builder::builder::Arg::value_delimiter">Arg::value_delimiter</a></li>
<li>Require a flag occurrence per value with <ahref="enum.ArgAction.html#variant.Append"title="variant clap_builder::builder::ArgAction::Append"><code>ArgAction::Append</code></a></li>
<li>Require positional arguments to appear after <code>--</code> with <ahref="struct.Arg.html#method.last"title="method clap_builder::builder::Arg::last"><code>Arg::last</code></a></li>
<p>Flag/option hybrid (see also <ahref="struct.Arg.html#method.default_missing_value"title="method clap_builder::builder::Arg::default_missing_value">default_missing_value</a>)</p>
<p>The problem is <code>clap</code> doesn’t know when to stop parsing values for “file”.</p>
<p>A solution for the example above is to limit how many values with a maximum, or specific
number, or to say <ahref="enum.ArgAction.html#variant.Append"title="variant clap_builder::builder::ArgAction::Append"><code>ArgAction::Append</code></a> is ok, but multiple values are not.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.value_name"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#1190-1197">source</a><h4class="code-header">pub fn <ahref="#method.value_name"class="fn">value_name</a>(self, name: impl <aclass="trait"href="trait.IntoResettable.html"title="trait clap_builder::builder::IntoResettable">IntoResettable</a><<aclass="struct"href="struct.Str.html"title="struct clap_builder::builder::Str">Str</a>>) -> Self</h4></section></summary><divclass="docblock"><p>Placeholder for the argument’s value in the help message / usage.</p>
<p>This name is cosmetic only; the name is <strong>not</strong> used to access arguments.
This setting can be very helpful when describing the type of input the user should be
using, such as <code>FILE</code>, <code>INTERFACE</code>, etc. Although not required, it’s somewhat convention to
) -> Self</h4></section></summary><divclass="docblock"><p>Placeholders for the argument’s values in the help message / usage.</p>
<p>These names are cosmetic only, used for help and usage strings only. The names are <strong>not</strong>
used to access arguments. The values of the arguments are accessed in numeric order (i.e.
if you specify two names <code>one</code> and <code>two</code><code>one</code> will be the first matched value, <code>two</code> will
be the second).</p>
<p>This setting can be very helpful when describing the type of input the user should be
using, such as <code>FILE</code>, <code>INTERFACE</code>, etc. Although not required, it’s somewhat convention to
use all capital letters for the value name.</p>
<p><strong>Pro Tip:</strong> It may help to use <ahref="struct.Arg.html#method.next_line_help"title="method clap_builder::builder::Arg::next_line_help"><code>Arg::next_line_help(true)</code></a> if there are long, or
multiple value names in order to not throw off the help text alignment of all options.</p>
<p><strong>NOTE:</strong> implicitly sets <ahref="struct.Arg.html#method.action"title="method clap_builder::builder::Arg::action"><code>Arg::action(ArgAction::Set)</code></a> and <ahref="struct.Arg.html#method.num_args"title="method clap_builder::builder::Arg::num_args"><code>Arg::num_args(1..)</code></a>.</p>
--io-files <INFILE><OUTFILE> Some help text
-V, --version Print version information
</code></pre></div></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.value_hint"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#1293-1296">source</a><h4class="code-header">pub fn <ahref="#method.value_hint"class="fn">value_hint</a>(self, value_hint: impl <aclass="trait"href="trait.IntoResettable.html"title="trait clap_builder::builder::IntoResettable">IntoResettable</a><<aclass="enum"href="enum.ValueHint.html"title="enum clap_builder::builder::ValueHint">ValueHint</a>>) -> Self</h4></section></summary><divclass="docblock"><p>Provide the shell a hint about how to complete this argument.</p>
<p>See <ahref="enum.ValueHint.html"title="enum clap_builder::builder::ValueHint"><code>ValueHint</code></a> for more information.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.ignore_case"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#1350-1356">source</a><h4class="code-header">pub fn <ahref="#method.ignore_case"class="fn">ignore_case</a>(self, yes: <aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.bool.html">bool</a>) -> Self</h4></section></summary><divclass="docblock"><p>Match values against <ahref="struct.PossibleValuesParser.html"title="struct clap_builder::builder::PossibleValuesParser"><code>PossibleValuesParser</code></a> without matching case.</p>
<p>When other arguments are conditionally required based on the
value of a case-insensitive argument, the equality check done
by <ahref="struct.Arg.html#method.required_if_eq"title="method clap_builder::builder::Arg::required_if_eq"><code>Arg::required_if_eq</code></a>, <ahref="struct.Arg.html#method.required_if_eq_any"title="method clap_builder::builder::Arg::required_if_eq_any"><code>Arg::required_if_eq_any</code></a>, or
<ahref="struct.Arg.html#method.required_if_eq_all"title="method clap_builder::builder::Arg::required_if_eq_all"><code>Arg::required_if_eq_all</code></a> is case-insensitive.</p>
<p><strong>NOTE:</strong> Setting this requires <ahref="struct.Arg.html#method.num_args"title="method clap_builder::builder::Arg::num_args">taking values</a></p>
<p><strong>NOTE:</strong> To do unicode case folding, enable the <code>unicode</code> feature flag.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.allow_hyphen_values"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#1414-1420">source</a><h4class="code-header">pub fn <ahref="#method.allow_hyphen_values"class="fn">allow_hyphen_values</a>(self, yes: <aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.bool.html">bool</a>) -> Self</h4></section></summary><divclass="docblock"><p>Allows values which start with a leading hyphen (<code>-</code>)</p>
<p>See also <ahref="struct.Arg.html#method.trailing_var_arg"title="method clap_builder::builder::Arg::trailing_var_arg"><code>trailing_var_arg</code></a>.</p>
<p><strong>NOTE:</strong> Setting this requires <ahref="struct.Arg.html#method.num_args"title="method clap_builder::builder::Arg::num_args">taking values</a></p>
<p><strong>WARNING:</strong> Prior arguments with <code>allow_hyphen_values(true)</code> get precedence over known
flags but known flags get precedence over the next possible positional argument with
<code>allow_hyphen_values(true)</code>. When combined with [<code>Arg::num_args(..)</code>],
<ahref="struct.Arg.html#method.value_terminator"title="method clap_builder::builder::Arg::value_terminator"><code>Arg::value_terminator</code></a> is one way to ensure processing stops.</p>
<p><strong>WARNING</strong>: Take caution when using this setting combined with another argument using
<ahref="struct.Arg.html#method.num_args"title="method clap_builder::builder::Arg::num_args"><code>Arg::num_args</code></a>, as this becomes ambiguous <code>$ prog --arg -- -- val</code>. All
three <code>--, --, val</code> will be values when the user may have thought the second <code>--</code> would
constitute the normal, “Only positional args follow” idiom.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.allow_negative_numbers"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#1444-1450">source</a><h4class="code-header">pub fn <ahref="#method.allow_negative_numbers"class="fn">allow_negative_numbers</a>(self, yes: <aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.bool.html">bool</a>) -> Self</h4></section></summary><divclass="docblock"><p>Allows negative numbers to pass as values.</p>
<p>This is similar to <ahref="struct.Arg.html#method.allow_hyphen_values"title="method clap_builder::builder::Arg::allow_hyphen_values"><code>Arg::allow_hyphen_values</code></a> except that it only allows numbers,
all other undefined leading hyphens will fail to parse.</p>
<p><strong>NOTE:</strong> Setting this requires <ahref="struct.Arg.html#method.num_args"title="method clap_builder::builder::Arg::num_args">taking values</a></p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.require_equals"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#1498-1504">source</a><h4class="code-header">pub fn <ahref="#method.require_equals"class="fn">require_equals</a>(self, yes: <aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.bool.html">bool</a>) -> Self</h4></section></summary><divclass="docblock"><p>Requires that options use the <code>--option=val</code> syntax</p>
<p>i.e. an equals between the option and associated value.</p>
<p><strong>NOTE:</strong> Setting this requires <ahref="struct.Arg.html#method.num_args"title="method clap_builder::builder::Arg::num_args">taking values</a></p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.value_terminator"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#1603-1606">source</a><h4class="code-header">pub fn <ahref="#method.value_terminator"class="fn">value_terminator</a>(self, term: impl <aclass="trait"href="trait.IntoResettable.html"title="trait clap_builder::builder::IntoResettable">IntoResettable</a><<aclass="struct"href="struct.Str.html"title="struct clap_builder::builder::Str">Str</a>>) -> Self</h4></section></summary><divclass="docblock"><p>Sentinel to <strong>stop</strong> parsing multiple values of a given argument.</p>
<p>By default when
one sets <ahref="struct.Arg.html#method.num_args"title="method clap_builder::builder::Arg::num_args"><code>num_args(1..)</code></a> on an argument, clap will continue parsing values for that
argument until it reaches another valid argument, or one of the other more specific settings
for multiple values is used (such as <ahref="struct.Arg.html#method.num_args"title="method clap_builder::builder::Arg::num_args"><code>num_args</code></a>).</p>
<p><strong>NOTE:</strong> This setting only applies to <ahref="struct.Arg.html#method.action"title="method clap_builder::builder::Arg::action">options</a> and <ahref="struct.Arg.html#method.index"title="method clap_builder::builder::Arg::index">positional arguments</a></p>
<p><strong>NOTE:</strong> When the terminator is passed in on the command line, it is <strong>not</strong> stored as one
<p>Will result in everything after <code>--</code> to be considered one raw argument. This behavior
may not be exactly what you are expecting and using <ahref="struct.Arg.html#method.trailing_var_arg"title="method clap_builder::builder::Arg::trailing_var_arg"><code>Arg::trailing_var_arg</code></a>
<ahref="struct.Arg.html#method.allow_hyphen_values"title="method clap_builder::builder::Arg::allow_hyphen_values"><code>Arg::allow_hyphen_values(true)</code></a>, and <ahref="struct.Arg.html#method.last"title="method clap_builder::builder::Arg::last"><code>Arg::last(true)</code></a> when set to <code>true</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.default_value"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#1697-1704">source</a><h4class="code-header">pub fn <ahref="#method.default_value"class="fn">default_value</a>(self, val: impl <aclass="trait"href="trait.IntoResettable.html"title="trait clap_builder::builder::IntoResettable">IntoResettable</a><<aclass="struct"href="struct.OsStr.html"title="struct clap_builder::builder::OsStr">OsStr</a>>) -> Self</h4></section></summary><divclass="docblock"><p>Value for the argument when not present.</p>
<p><strong>NOTE:</strong> If the user <em>does not</em> use this argument at runtime <ahref="../parser/struct.ArgMatches.html#method.contains_id"title="method clap_builder::parser::ArgMatches::contains_id"><code>ArgMatches::contains_id</code></a> will
still return <code>true</code>. If you wish to determine whether the argument was used at runtime or
<p><strong>NOTE:</strong> This setting is perfectly compatible with <ahref="struct.Arg.html#method.default_value_if"title="method clap_builder::builder::Arg::default_value_if"><code>Arg::default_value_if</code></a> but slightly
different. <code>Arg::default_value</code><em>only</em> takes effect when the user has not provided this arg
at runtime. <code>Arg::default_value_if</code> however only takes effect when the user has not provided
a value at runtime <strong>and</strong> these other conditions are met as well. If you have set
<code>Arg::default_value</code> and <code>Arg::default_value_if</code>, and the user <strong>did not</strong> provide this arg
at runtime, nor were the conditions met for <code>Arg::default_value_if</code>, the <code>Arg::default_value</code>
will be applied.</p>
<p>Like with command-line values, this will be split by <ahref="struct.Arg.html#method.value_delimiter"title="method clap_builder::builder::Arg::value_delimiter"><code>Arg::value_delimiter</code></a>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.default_missing_value"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#1835-1842">source</a><h4class="code-header">pub fn <ahref="#method.default_missing_value"class="fn">default_missing_value</a>(self, val: impl <aclass="trait"href="trait.IntoResettable.html"title="trait clap_builder::builder::IntoResettable">IntoResettable</a><<aclass="struct"href="struct.OsStr.html"title="struct clap_builder::builder::OsStr">OsStr</a>>) -> Self</h4></section></summary><divclass="docblock"><p>Value for the argument when the flag is present but no value is specified.</p>
<p>This configuration option is often used to give the user a shortcut and allow them to
efficiently specify an option argument without requiring an explicitly value. The <code>--color</code>
argument is a common example. By, supplying an default, such as <code>default_missing_value("always")</code>,
the user can quickly just add <code>--color</code> to the command line to produce the desired color output.</p>
<p><strong>NOTE:</strong> using this configuration option requires the use of the
<ahref="struct.Arg.html#method.num_args"title="method clap_builder::builder::Arg::num_args"><code>.num_args(0..N)</code></a> and the
<ahref="struct.Arg.html#method.require_equals"title="method clap_builder::builder::Arg::require_equals"><code>.require_equals(true)</code></a> configuration option. These are required in
order to unambiguously determine what, if any, value was supplied for the argument.</p>
<p>Like with command-line values, this will be split by <ahref="struct.Arg.html#method.value_delimiter"title="method clap_builder::builder::Arg::value_delimiter"><code>Arg::value_delimiter</code></a>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.default_missing_value_os"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#1852-1854">source</a><h4class="code-header">pub fn <ahref="#method.default_missing_value_os"class="fn">default_missing_value_os</a>(self, val: impl <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><<aclass="struct"href="struct.OsStr.html"title="struct clap_builder::builder::OsStr">OsStr</a>>) -> Self</h4></section></summary><divclass="docblock"><p>Value for the argument when the flag is present but no value is specified.</p>
</div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-Arg-2"class="impl"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#2060-2639">source</a><ahref="#impl-Arg-2"class="anchor">§</a><h3class="code-header">impl <aclass="struct"href="struct.Arg.html"title="struct clap_builder::builder::Arg">Arg</a></h3></section></summary><divclass="docblock"><h4id="help-1"><ahref="#help-1">Help</a></h4></div><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.help"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#2107-2110">source</a><h4class="code-header">pub fn <ahref="#method.help"class="fn">help</a>(self, h: impl <aclass="trait"href="trait.IntoResettable.html"title="trait clap_builder::builder::IntoResettable">IntoResettable</a><<aclass="struct"href="struct.StyledStr.html"title="struct clap_builder::builder::StyledStr">StyledStr</a>>) -> Self</h4></section></summary><divclass="docblock"><p>Sets the description of the argument for short help (<code>-h</code>).</p>
<p>Typically, this is a short (one line) description of the arg.</p>
<p>If <ahref="struct.Arg.html#method.long_help"title="method clap_builder::builder::Arg::long_help"><code>Arg::long_help</code></a> is not specified, this message will be displayed for <code>--help</code>.</p>
<p><strong>NOTE:</strong> Only <code>Arg::help</code> is used in completion script generation in order to be concise</p>
--config Some help text describing the --config arg
-h, --help Print help information
-V, --version Print version information
</code></pre></div></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.long_help"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#2171-2174">source</a><h4class="code-header">pub fn <ahref="#method.long_help"class="fn">long_help</a>(self, h: impl <aclass="trait"href="trait.IntoResettable.html"title="trait clap_builder::builder::IntoResettable">IntoResettable</a><<aclass="struct"href="struct.StyledStr.html"title="struct clap_builder::builder::StyledStr">StyledStr</a>>) -> Self</h4></section></summary><divclass="docblock"><p>Sets the description of the argument for long help (<code>--help</code>).</p>
<p>Typically this a more detailed (multi-line) message
that describes the arg.</p>
<p>If <ahref="struct.Arg.html#method.help"title="method clap_builder::builder::Arg::help"><code>Arg::help</code></a> is not specified, this message will be displayed for <code>-h</code>.</p>
<p><strong>NOTE:</strong> Only <ahref="struct.Arg.html#method.help"title="method clap_builder::builder::Arg::help"><code>Arg::help</code></a> is used in completion script generation in order to be concise</p>
The config file used by the myprog must be in JSON format
with only valid keys and may not contain other nonsense
that cannot be read by this program. Obviously I'm going on
and on, so I'll stop now.
-h, --help
Print help information
-V, --version
Print version information
</code></pre></div></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.display_order"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#2238-2241">source</a><h4class="code-header">pub fn <ahref="#method.display_order"class="fn">display_order</a>(self, ord: impl <aclass="trait"href="trait.IntoResettable.html"title="trait clap_builder::builder::IntoResettable">IntoResettable</a><<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>>) -> Self</h4></section></summary><divclass="docblock"><p>Allows custom ordering of args within the help message.</p>
<p><code>Arg</code>s with a lower value will be displayed first in the help message.
Those with the same display order will be sorted.</p>
<p><code>Arg</code>s are automatically assigned a display order based on the order they are added to the
Overriding this is helpful when the order arguments are added in isn’t the same as the
display order, whether in one-off cases or to automatically sort arguments.</p>
<p>To change, see <ahref="struct.Command.html#method.next_display_order"title="method clap_builder::builder::Command::next_display_order"><code>Command::next_display_order</code></a>.</p>
<p><strong>NOTE:</strong> This setting is ignored for <ahref="struct.Arg.html#method.index"title="method clap_builder::builder::Arg::index">positional arguments</a> which are always displayed in
-a, --airplane <airplane> I should be first!
-b, --boat <boar> Some help and text
-h, --help Print help information
-? Alt help
</code></pre></div></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.help_heading"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#2248-2251">source</a><h4class="code-header">pub fn <ahref="#method.help_heading"class="fn">help_heading</a>(self, heading: impl <aclass="trait"href="trait.IntoResettable.html"title="trait clap_builder::builder::IntoResettable">IntoResettable</a><<aclass="struct"href="struct.Str.html"title="struct clap_builder::builder::Str">Str</a>>) -> Self</h4></section></summary><divclass="docblock"><p>Override the <ahref="struct.Command.html#method.next_help_heading"title="method clap_builder::builder::Command::next_help_heading">current</a> help section.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.next_line_help"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#2300-2306">source</a><h4class="code-header">pub fn <ahref="#method.next_line_help"class="fn">next_line_help</a>(self, yes: <aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.bool.html">bool</a>) -> Self</h4></section></summary><divclass="docblock"><p>Render the <ahref="struct.Arg.html#method.help"title="method clap_builder::builder::Arg::help">help</a> on the line after the argument.</p>
<p>This can be helpful for arguments with very long or complex help messages.
This can also be helpful for arguments with very long flag names, or many/long value names.</p>
<p><strong>NOTE:</strong> To apply this setting to all arguments and subcommands, consider using
</code></pre></div></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.hide"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#2344-2350">source</a><h4class="code-header">pub fn <ahref="#method.hide"class="fn">hide</a>(self, yes: <aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.bool.html">bool</a>) -> Self</h4></section></summary><divclass="docblock"><p>Do not display the argument in help message.</p>
<p><strong>NOTE:</strong> This does <strong>not</strong> hide the argument from usage strings on error</p>
</code></pre></div></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.hide_possible_values"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#2378-2384">source</a><h4class="code-header">pub fn <ahref="#method.hide_possible_values"class="fn">hide_possible_values</a>(self, yes: <aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.bool.html">bool</a>) -> Self</h4></section></summary><divclass="docblock"><p>Do not display the <ahref="struct.ValueParser.html#method.possible_values"title="method clap_builder::builder::ValueParser::possible_values">possible values</a> in the help message.</p>
<p>This is useful for args with many values, or ones which are explained elsewhere in the
help text.</p>
<p><strong>NOTE:</strong> Setting this requires <ahref="struct.Arg.html#method.num_args"title="method clap_builder::builder::Arg::num_args">taking values</a></p>
<p>If we were to run the above program with <code>--help</code> the <code>[values: fast, slow]</code> portion of
the help text would be omitted.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.hide_default_value"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#2410-2416">source</a><h4class="code-header">pub fn <ahref="#method.hide_default_value"class="fn">hide_default_value</a>(self, yes: <aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.bool.html">bool</a>) -> Self</h4></section></summary><divclass="docblock"><p>Do not display the default value of the argument in the help message.</p>
<p>This is useful when default behavior of an arg is explained elsewhere in the help text.</p>
<p><strong>NOTE:</strong> Setting this requires <ahref="struct.Arg.html#method.num_args"title="method clap_builder::builder::Arg::num_args">taking values</a></p>
<p>If we were to run the above program with <code>--help</code> the <code>[default: localhost]</code> portion of
the help text would be omitted.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.hide_short_help"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#2555-2561">source</a><h4class="code-header">pub fn <ahref="#method.hide_short_help"class="fn">hide_short_help</a>(self, yes: <aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.bool.html">bool</a>) -> Self</h4></section></summary><divclass="docblock"><p>Hides an argument from short help (<code>-h</code>).</p>
<p><strong>NOTE:</strong> This does <strong>not</strong> hide the argument from usage strings on error</p>
<p><strong>NOTE:</strong> Setting this option will cause next-line-help output style to be used
when long help (<code>--help</code>) is called.</p>
--config Some help text describing the --config arg
-h, --help Print help information
-V, --version Print version information
</code></pre></div></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.hide_long_help"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#2632-2638">source</a><h4class="code-header">pub fn <ahref="#method.hide_long_help"class="fn">hide_long_help</a>(self, yes: <aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.bool.html">bool</a>) -> Self</h4></section></summary><divclass="docblock"><p>Hides an argument from long help (<code>--help</code>).</p>
<p><strong>NOTE:</strong> This does <strong>not</strong> hide the argument from usage strings on error</p>
<p><strong>NOTE:</strong> Setting this option will cause next-line-help output style to be used
when long help (<code>--help</code>) is called.</p>
) -> Self</h4></section></summary><divclass="docblock"><p>Specifies the value of the argument if <code>arg</code> has been used at runtime.</p>
<p>If <code>default</code> is set to <code>None</code>, <code>default_value</code> will be removed.</p>
<p><strong>NOTE:</strong> This setting is perfectly compatible with <ahref="struct.Arg.html#method.default_value"title="method clap_builder::builder::Arg::default_value"><code>Arg::default_value</code></a> but slightly
different. <code>Arg::default_value</code><em>only</em> takes effect when the user has not provided this arg
at runtime. This setting however only takes effect when the user has not provided a value at
runtime <strong>and</strong> these other conditions are met as well. If you have set <code>Arg::default_value</code>
and <code>Arg::default_value_if</code>, and the user <strong>did not</strong> provide this arg at runtime, nor were
the conditions met for <code>Arg::default_value_if</code>, the <code>Arg::default_value</code> will be applied.</p>
<p>Like with command-line values, this will be split by <ahref="struct.Arg.html#method.value_delimiter"title="method clap_builder::builder::Arg::value_delimiter"><code>Arg::value_delimiter</code></a>.</p>
) -> Self</h4></section></summary><divclass="docblock"><p>Specifies multiple values and conditions in the same manner as <ahref="struct.Arg.html#method.default_value_if"title="method clap_builder::builder::Arg::default_value_if"><code>Arg::default_value_if</code></a>.</p>
<p>The method takes a slice of tuples in the <code>(arg, predicate, default)</code> format.</p>
<p><strong>NOTE</strong>: The conditions are stored in order and evaluated in the same order. I.e. the first
if multiple conditions are true, the first one found will be applied and the ultimate value.</p>
<p>Like with command-line values, this will be split by <ahref="struct.Arg.html#method.value_delimiter"title="method clap_builder::builder::Arg::value_delimiter"><code>Arg::value_delimiter</code></a>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.required_unless_present"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#3056-3063">source</a><h4class="code-header">pub fn <ahref="#method.required_unless_present"class="fn">required_unless_present</a>(self, arg_id: impl <aclass="trait"href="trait.IntoResettable.html"title="trait clap_builder::builder::IntoResettable">IntoResettable</a><<aclass="struct"href="../struct.Id.html"title="struct clap_builder::Id">Id</a>>) -> Self</h4></section></summary><divclass="docblock"><p>Set this arg as <ahref="struct.Arg.html#method.required"title="method clap_builder::builder::Arg::required">required</a> as long as the specified argument is not present at runtime.</p>
<p><strong>Pro Tip:</strong> Using <code>Arg::required_unless_present</code> implies <ahref="struct.Arg.html#method.required"title="method clap_builder::builder::Arg::required"><code>Arg::required</code></a> and is therefore not
) -> Self</h4></section></summary><divclass="docblock"><p>Sets this arg as <ahref="struct.Arg.html#method.required"title="method clap_builder::builder::Arg::required">required</a> unless <em>all</em> of the specified arguments are present at runtime.</p>
<p>In other words, parsing will succeed only if user either</p>
<ul>
<li>supplies the <code>self</code> arg.</li>
<li>supplies <em>all</em> of the <code>names</code> arguments.</li>
</ul>
<p><strong>NOTE:</strong> If you wish for this argument to only be required unless <em>any of</em> these args are
present see <ahref="struct.Arg.html#method.required_unless_present_any"title="method clap_builder::builder::Arg::required_unless_present_any"><code>Arg::required_unless_present_any</code></a></p>
) -> Self</h4></section></summary><divclass="docblock"><p>Sets this arg as <ahref="struct.Arg.html#method.required"title="method clap_builder::builder::Arg::required">required</a> unless <em>any</em> of the specified arguments are present at runtime.</p>
<p>In other words, parsing will succeed only if user either</p>
<ul>
<li>supplies the <code>self</code> arg.</li>
<li>supplies <em>one or more</em> of the <code>unless</code> arguments.</li>
</ul>
<p><strong>NOTE:</strong> If you wish for this argument to be required unless <em>all of</em> these args are
present see <ahref="struct.Arg.html#method.required_unless_present_all"title="method clap_builder::builder::Arg::required_unless_present_all"><code>Arg::required_unless_present_all</code></a></p>
<p>Setting <ahref="struct.Arg.html#method.required_unless_present_any"title="method clap_builder::builder::Arg::required_unless_present_any"><code>Arg::required_unless_present_any(names)</code></a> requires that the argument be used at runtime
<em>unless</em><em>at least one of</em> the args in <code>names</code> are present. In the following example, the
required argument is <em>not</em> provided, but it’s not an error because one the <code>unless</code> args
<p>Setting <ahref="struct.Arg.html#method.required_unless_present_any"title="method clap_builder::builder::Arg::required_unless_present_any"><code>Arg::required_unless_present_any(names)</code></a> and <em>not</em> supplying <em>at least one of</em><code>names</code>
) -> Self</h4></section></summary><divclass="docblock"><p>This argument is <ahref="struct.Arg.html#method.required"title="method clap_builder::builder::Arg::required">required</a> only if the specified <code>arg</code> is present at runtime and its value
) -> Self</h4></section></summary><divclass="docblock"><p>Specify this argument is <ahref="struct.Arg.html#method.required"title="method clap_builder::builder::Arg::required">required</a> based on multiple conditions.</p>
<p>The conditions are set up in a <code>(arg, val)</code> style tuple. The requirement will only become
valid if one of the specified <code>arg</code>’s value equals its corresponding <code>val</code>.</p>
<spanclass="macro">assert!</span>(res.is_ok()); <spanclass="comment">// We didn't use --option=spec, or --extra=val so "cfg" isn't required</span></code></pre></div>
<p>Setting <code>Arg::required_if_eq_any([(arg, val)])</code> and having any of the <code>arg</code>s used with its
value of <code>val</code> but <em>not</em> using this arg is an error.</p>
) -> Self</h4></section></summary><divclass="docblock"><p>Specify this argument is <ahref="struct.Arg.html#method.required"title="method clap_builder::builder::Arg::required">required</a> based on multiple conditions.</p>
<p>The conditions are set up in a <code>(arg, val)</code> style tuple. The requirement will only become
valid if every one of the specified <code>arg</code>’s value equals its corresponding <code>val</code>.</p>
<spanclass="macro">assert!</span>(res.is_ok()); <spanclass="comment">// We didn't use --option=spec --extra=val so "cfg" isn't required</span></code></pre></div>
<p>Setting <code>Arg::required_if_eq_all([(arg, val)])</code> and having all of the <code>arg</code>s used with its
value of <code>val</code> but <em>not</em> using this arg is an error.</p>
) -> Self</h4></section></summary><divclass="docblock"><p>Require another argument if this arg matches the <ahref="enum.ArgPredicate.html"title="enum clap_builder::builder::ArgPredicate"><code>ArgPredicate</code></a></p>
<p>This method takes <code>value, another_arg</code> pair. At runtime, clap will check
if this arg (<code>self</code>) matches the <ahref="enum.ArgPredicate.html"title="enum clap_builder::builder::ArgPredicate"><code>ArgPredicate</code></a>.
If it does, <code>another_arg</code> will be marked as required.</p>
<spanclass="macro">assert!</span>(res.is_ok()); <spanclass="comment">// We didn't use --config=my.cfg, so other wasn't required</span></code></pre></div>
<p>Setting <code>Arg::requires_if(val, arg)</code> and setting the value to <code>val</code> but <em>not</em> supplying
<p>Setting <code>Arg::requires_ifs</code> with <ahref="enum.ArgPredicate.html#variant.IsPresent"title="variant clap_builder::builder::ArgPredicate::IsPresent"><code>ArgPredicate::IsPresent</code></a> and <em>not</em> supplying all the
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.conflicts_with"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#3687-3694">source</a><h4class="code-header">pub fn <ahref="#method.conflicts_with"class="fn">conflicts_with</a>(self, arg_id: impl <aclass="trait"href="trait.IntoResettable.html"title="trait clap_builder::builder::IntoResettable">IntoResettable</a><<aclass="struct"href="../struct.Id.html"title="struct clap_builder::Id">Id</a>>) -> Self</h4></section></summary><divclass="docblock"><p>This argument is mutually exclusive with the specified argument.</p>
<p><strong>NOTE:</strong> Conflicting rules take precedence over being required by default. Conflict rules
only need to be set for one of the two arguments, they do not need to be set for each.</p>
<p><strong>NOTE:</strong> Defining a conflict is two-way, but does <em>not</em> need to defined for both arguments
(i.e. if A conflicts with B, defining A.conflicts_with(B) is sufficient. You do not
need to also do B.conflicts_with(A))</p>
<p><strong>NOTE:</strong><ahref="struct.Arg.html#method.conflicts_with_all"title="method clap_builder::builder::Arg::conflicts_with_all"><code>Arg::conflicts_with_all(names)</code></a> allows specifying an argument which conflicts with more than one argument.</p>
<p><strong>NOTE</strong><ahref="struct.Arg.html#method.exclusive"title="method clap_builder::builder::Arg::exclusive"><code>Arg::exclusive(true)</code></a> allows specifying an argument which conflicts with every other argument.</p>
<p><strong>NOTE:</strong> All arguments implicitly conflict with themselves.</p>
<p><strong>NOTE:</strong> Conflicting rules take precedence over being required by default. Conflict rules
only need to be set for one of the two arguments, they do not need to be set for each.</p>
<p><strong>NOTE:</strong> Defining a conflict is two-way, but does <em>not</em> need to defined for both arguments
(i.e. if A conflicts with B, defining A.conflicts_with(B) is sufficient. You do not need
need to also do B.conflicts_with(A))</p>
<p><strong>NOTE:</strong><ahref="struct.Arg.html#method.exclusive"title="method clap_builder::builder::Arg::exclusive"><code>Arg::exclusive(true)</code></a> allows specifying an argument which conflicts with every other argument.</p>
will override each other in POSIX style (whichever argument was specified at runtime
<strong>last</strong> “wins”)</p>
<p><strong>NOTE:</strong> When an argument is overridden it is essentially as if it never was used, any
conflicts, requirements, etc. are evaluated <strong>after</strong> all “overrides” have been removed</p>
<p><strong>NOTE:</strong> Overriding an argument implies they <ahref="struct.Arg.html#method.conflicts_with"title="method clap_builder::builder::Arg::conflicts_with">conflict</a>.</p>
<spanclass="macro">assert!</span>(m.get_flag(<spanclass="string">"debug"</span>)); <spanclass="comment">// even though flag conflicts with debug, it's as if flag
// was never used because it was overridden with color
) -> Self</h4></section></summary><divclass="docblock"><p>Sets multiple mutually overridable arguments by name.</p>
<p>i.e. this argument and the following argument will override each other in POSIX style
(whichever argument was specified at runtime <strong>last</strong> “wins”)</p>
<p><strong>NOTE:</strong> When an argument is overridden it is essentially as if it never was used, any
conflicts, requirements, etc. are evaluated <strong>after</strong> all “overrides” have been removed</p>
<p><strong>NOTE:</strong> Overriding an argument implies they <ahref="struct.Arg.html#method.conflicts_with_all"title="method clap_builder::builder::Arg::conflicts_with_all">conflict</a>.</p>
<spanclass="comment">// ^~~~~~^~~~~~~~~ flag and debug are overridden by color
</span><spanclass="macro">assert!</span>(m.get_flag(<spanclass="string">"color"</span>)); <spanclass="comment">// even though flag conflicts with color, it's as if flag
// and debug were never used because they were overridden
</div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-Arg-4"class="impl"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#3828-4198">source</a><ahref="#impl-Arg-4"class="anchor">§</a><h3class="code-header">impl <aclass="struct"href="struct.Arg.html"title="struct clap_builder::builder::Arg">Arg</a></h3></section></summary><divclass="docblock"><h4id="reflection"><ahref="#reflection">Reflection</a></h4></div><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_id"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#3831-3833">source</a><h4class="code-header">pub fn <ahref="#method.get_id"class="fn">get_id</a>(&self) ->&<aclass="struct"href="../struct.Id.html"title="struct clap_builder::Id">Id</a></h4></section></summary><divclass="docblock"><p>Get the name of the argument</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_help"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#3837-3839">source</a><h4class="code-header">pub fn <ahref="#method.get_help"class="fn">get_help</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&<aclass="struct"href="struct.StyledStr.html"title="struct clap_builder::builder::StyledStr">StyledStr</a>></h4></section></summary><divclass="docblock"><p>Get the help specified for this argument, if any</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_long_help"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#3853-3855">source</a><h4class="code-header">pub fn <ahref="#method.get_long_help"class="fn">get_long_help</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&<aclass="struct"href="struct.StyledStr.html"title="struct clap_builder::builder::StyledStr">StyledStr</a>></h4></section></summary><divclass="docblock"><p>Get the long help specified for this argument, if any</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_help_heading"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#3859-3864">source</a><h4class="code-header">pub fn <ahref="#method.get_help_heading"class="fn">get_help_heading</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.str.html">str</a>></h4></section></summary><divclass="docblock"><p>Get the help heading specified for this argument, if any</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_short"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#3868-3870">source</a><h4class="code-header">pub fn <ahref="#method.get_short"class="fn">get_short</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.char.html">char</a>></h4></section></summary><divclass="docblock"><p>Get the short option name for this argument, if any</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_visible_short_aliases"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#3874-3886">source</a><h4class="code-header">pub fn <ahref="#method.get_visible_short_aliases"class="fn">get_visible_short_aliases</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="struct"href="https://doc.rust-lang.org/1.76.0/alloc/vec/struct.Vec.html"title="struct alloc::vec::Vec">Vec</a><<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.char.html">char</a>>></h4></section></summary><divclass="docblock"><p>Get visible short aliases for this argument, if any</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_all_short_aliases"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#3890-3896">source</a><h4class="code-header">pub fn <ahref="#method.get_all_short_aliases"class="fn">get_all_short_aliases</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="struct"href="https://doc.rust-lang.org/1.76.0/alloc/vec/struct.Vec.html"title="struct alloc::vec::Vec">Vec</a><<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.char.html">char</a>>></h4></section></summary><divclass="docblock"><p>Get <em>all</em> short aliases for this argument, if any, both visible and hidden.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_short_and_visible_aliases"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#3900-3909">source</a><h4class="code-header">pub fn <ahref="#method.get_short_and_visible_aliases"class="fn">get_short_and_visible_aliases</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="struct"href="https://doc.rust-lang.org/1.76.0/alloc/vec/struct.Vec.html"title="struct alloc::vec::Vec">Vec</a><<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.char.html">char</a>>></h4></section></summary><divclass="docblock"><p>Get the short option name and its visible aliases, if any</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_long"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#3913-3915">source</a><h4class="code-header">pub fn <ahref="#method.get_long"class="fn">get_long</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.str.html">str</a>></h4></section></summary><divclass="docblock"><p>Get the long option name for this argument, if any</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_visible_aliases"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#3919-3930">source</a><h4class="code-header">pub fn <ahref="#method.get_visible_aliases"class="fn">get_visible_aliases</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="struct"href="https://doc.rust-lang.org/1.76.0/alloc/vec/struct.Vec.html"title="struct alloc::vec::Vec">Vec</a><&<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.str.html">str</a>>></h4></section></summary><divclass="docblock"><p>Get visible aliases for this argument, if any</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_all_aliases"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#3934-3940">source</a><h4class="code-header">pub fn <ahref="#method.get_all_aliases"class="fn">get_all_aliases</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="struct"href="https://doc.rust-lang.org/1.76.0/alloc/vec/struct.Vec.html"title="struct alloc::vec::Vec">Vec</a><&<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.str.html">str</a>>></h4></section></summary><divclass="docblock"><p>Get <em>all</em> aliases for this argument, if any, both visible and hidden.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_long_and_visible_aliases"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#3944-3953">source</a><h4class="code-header">pub fn <ahref="#method.get_long_and_visible_aliases"class="fn">get_long_and_visible_aliases</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="struct"href="https://doc.rust-lang.org/1.76.0/alloc/vec/struct.Vec.html"title="struct alloc::vec::Vec">Vec</a><&<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.str.html">str</a>>></h4></section></summary><divclass="docblock"><p>Get the long option name and its visible aliases, if any</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_possible_values"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#3957-3966">source</a><h4class="code-header">pub fn <ahref="#method.get_possible_values"class="fn">get_possible_values</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.76.0/alloc/vec/struct.Vec.html"title="struct alloc::vec::Vec">Vec</a><<aclass="struct"href="struct.PossibleValue.html"title="struct clap_builder::builder::PossibleValue">PossibleValue</a>></h4></section></summary><divclass="docblock"><p>Get the names of possible values for this argument. Only useful for user
facing applications, such as building help messages or man files</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_value_names"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#3970-3976">source</a><h4class="code-header">pub fn <ahref="#method.get_value_names"class="fn">get_value_names</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&[<aclass="struct"href="struct.Str.html"title="struct clap_builder::builder::Str">Str</a>]></h4></section></summary><divclass="docblock"><p>Get the names of values for this argument.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_num_args"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#3980-3982">source</a><h4class="code-header">pub fn <ahref="#method.get_num_args"class="fn">get_num_args</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="struct"href="struct.ValueRange.html"title="struct clap_builder::builder::ValueRange">ValueRange</a>></h4></section></summary><divclass="docblock"><p>Get the number of values for this argument.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_value_delimiter"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#3991-3993">source</a><h4class="code-header">pub fn <ahref="#method.get_value_delimiter"class="fn">get_value_delimiter</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.char.html">char</a>></h4></section></summary><divclass="docblock"><p>Get the delimiter between multiple values</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_value_terminator"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#3998-4000">source</a><h4class="code-header">pub fn <ahref="#method.get_value_terminator"class="fn">get_value_terminator</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&<aclass="struct"href="struct.Str.html"title="struct clap_builder::builder::Str">Str</a>></h4></section></summary><divclass="docblock"><p>Get the value terminator for this argument. The value_terminator is a value
that terminates parsing of multi-valued arguments.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_index"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#4004-4006">source</a><h4class="code-header">pub fn <ahref="#method.get_index"class="fn">get_index</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>></h4></section></summary><divclass="docblock"><p>Get the index of this argument, if any</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_value_hint"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#4009-4022">source</a><h4class="code-header">pub fn <ahref="#method.get_value_hint"class="fn">get_value_hint</a>(&self) -><aclass="enum"href="enum.ValueHint.html"title="enum clap_builder::builder::ValueHint">ValueHint</a></h4></section></summary><divclass="docblock"><p>Get the value hint of this argument</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_default_values"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#4050-4052">source</a><h4class="code-header">pub fn <ahref="#method.get_default_values"class="fn">get_default_values</a>(&self) ->&[<aclass="struct"href="struct.OsStr.html"title="struct clap_builder::builder::OsStr">OsStr</a>]</h4></section></summary><divclass="docblock"><p>Get the default values specified for this argument, if any</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.is_positional"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#4067-4069">source</a><h4class="code-header">pub fn <ahref="#method.is_positional"class="fn">is_positional</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>Checks whether this argument is a positional or not.</p>
Self: <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><divclass='docblock'>Compares and returns the maximum of two values. <ahref="https://doc.rust-lang.org/1.76.0/core/cmp/trait.Ord.html#method.max">Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.min"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.21.0">1.21.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.76.0/src/core/cmp.rs.html#849-851">source</a></span><ahref="#method.min"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.76.0/core/cmp/trait.Ord.html#method.min"class="fn">min</a>(self, other: Self) -> Self<divclass="where">where
Self: <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><divclass='docblock'>Compares and returns the minimum of two values. <ahref="https://doc.rust-lang.org/1.76.0/core/cmp/trait.Ord.html#method.min">Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.clamp"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.50.0">1.50.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.76.0/src/core/cmp.rs.html#874-877">source</a></span><ahref="#method.clamp"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.76.0/core/cmp/trait.Ord.html#method.clamp"class="fn">clamp</a>(self, min: Self, max: Self) -> Self<divclass="where">where
Self: <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a> + <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/cmp/trait.PartialOrd.html"title="trait core::cmp::PartialOrd">PartialOrd</a>,</div></h4></section></summary><divclass='docblock'>Restrict a value to a certain interval. <ahref="https://doc.rust-lang.org/1.76.0/core/cmp/trait.Ord.html#method.clamp">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-PartialEq-for-Arg"class="impl"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#4414-4418">source</a><ahref="#impl-PartialEq-for-Arg"class="anchor">§</a><h3class="code-header">impl <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/cmp/trait.PartialEq.html"title="trait core::cmp::PartialEq">PartialEq</a> for <aclass="struct"href="struct.Arg.html"title="struct clap_builder::builder::Arg">Arg</a></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.eq"class="method trait-impl"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#4415-4417">source</a><ahref="#method.eq"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.76.0/core/cmp/trait.PartialEq.html#tymethod.eq"class="fn">eq</a>(&self, other: &<aclass="struct"href="struct.Arg.html"title="struct clap_builder::builder::Arg">Arg</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
by <code>==</code>.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.ne"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.76.0/src/core/cmp.rs.html#242">source</a></span><ahref="#method.ne"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.76.0/core/cmp/trait.PartialEq.html#method.ne"class="fn">ne</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&Rhs</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
sufficient, and should not be overridden without very good reason.</div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-PartialOrd-for-Arg"class="impl"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#4420-4424">source</a><ahref="#impl-PartialOrd-for-Arg"class="anchor">§</a><h3class="code-header">impl <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/cmp/trait.PartialOrd.html"title="trait core::cmp::PartialOrd">PartialOrd</a> for <aclass="struct"href="struct.Arg.html"title="struct clap_builder::builder::Arg">Arg</a></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.partial_cmp"class="method trait-impl"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#4421-4423">source</a><ahref="#method.partial_cmp"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.76.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp"class="fn">partial_cmp</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&Self</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/cmp/enum.Ordering.html"title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><divclass='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <ahref="https://doc.rust-lang.org/1.76.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.lt"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.76.0/src/core/cmp.rs.html#1125">source</a></span><ahref="#method.lt"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.76.0/core/cmp/trait.PartialOrd.html#method.lt"class="fn">lt</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&Rhs</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <ahref="https://doc.rust-lang.org/1.76.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.le"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.76.0/src/core/cmp.rs.html#1142">source</a></span><ahref="#method.le"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.76.0/core/cmp/trait.PartialOrd.html#method.le"class="fn">le</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&Rhs</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code>
operator. <ahref="https://doc.rust-lang.org/1.76.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.gt"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.76.0/src/core/cmp.rs.html#1158">source</a></span><ahref="#method.gt"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.76.0/core/cmp/trait.PartialOrd.html#method.gt"class="fn">gt</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&Rhs</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <ahref="https://doc.rust-lang.org/1.76.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.ge"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.76.0/src/core/cmp.rs.html#1175">source</a></span><ahref="#method.ge"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.76.0/core/cmp/trait.PartialOrd.html#method.ge"class="fn">ge</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&Rhs</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code>
operator. <ahref="https://doc.rust-lang.org/1.76.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><sectionid="impl-Eq-for-Arg"class="impl"><aclass="src rightside"href="../../src/clap_builder/builder/arg.rs.html#4432">source</a><ahref="#impl-Eq-for-Arg"class="anchor">§</a><h3class="code-header">impl <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/cmp/trait.Eq.html"title="trait core::cmp::Eq">Eq</a> for <aclass="struct"href="struct.Arg.html"title="struct clap_builder::builder::Arg">Arg</a></h3></section></div><h2id="synthetic-implementations"class="section-header">Auto Trait Implementations<ahref="#synthetic-implementations"class="anchor">§</a></h2><divid="synthetic-implementations-list"><sectionid="impl-RefUnwindSafe-for-Arg"class="impl"><ahref="#impl-RefUnwindSafe-for-Arg"class="anchor">§</a><h3class="code-header">impl !<aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/panic/unwind_safe/trait.RefUnwindSafe.html"title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <aclass="struct"href="struct.Arg.html"title="struct clap_builder::builder::Arg">Arg</a></h3></section><sectionid="impl-Send-for-Arg"class="impl"><ahref="#impl-Send-for-Arg"class="anchor">§</a><h3class="code-header">impl <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html"title="trait core::marker::Send">Send</a> for <aclass="struct"href="struct.Arg.html"title="struct clap_builder::builder::Arg">Arg</a></h3></section><sectionid="impl-Sync-for-Arg"class="impl"><ahref="#impl-Sync-for-Arg"class="anchor">§</a><h3class="code-header">impl <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html"title="trait core::marker::Sync">Sync</a> for <aclass="struct"href="struct.Arg.html"title="struct clap_builder::builder::Arg">Arg</a></h3></section><sectionid="impl-Unpin-for-Arg"class="impl"><ahref="#impl-Unpin-for-Arg"class="anchor">§</a><h3class="code-header">impl <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Unpin.html"title="trait core::marker::Unpin">Unpin</a> for <aclass="struct"href="struct.Arg.html"title="struct clap_builder::builder::Arg">Arg</a></h3></section><sectionid="impl-UnwindSafe-for-Arg"class="impl"><ahref="#impl-UnwindSafe-for-Arg"class="anchor">§</a><h3class="code-header">impl !<aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/panic/unwind_safe/trait.UnwindSafe.html"title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <aclass="struct"href="struct.Arg.html"title="struct clap_builder::builder::Arg">Arg</a></h3></section></div><h2id="blanket-implementations"class="section-header">Blanket Implementations<ahref="#blanket-implementations"class="anchor">§</a></h2><divid="blanket-implementations-list"><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-Any-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/core/any.rs.html#140">source</a><ahref="#impl-Any-for-T"class="anchor">§</a><h3class="code-header">impl<T><aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/any/trait.Any.html"title="trait core::any::Any">Any</a> for T<divclass="where">where
T: 'static + ?<aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.type_id"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/core/any.rs.html#141">source</a><ahref="#method.type_id"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.76.0/core/any/trait.Any.html#tymethod.type_id"class="fn">type_id</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.76.0/core/any/struct.TypeId.html"title="struct core::any::TypeId">TypeId</a></h4></section></summary><divclass='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <ahref="https://doc.rust-lang.org/1.76.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-Borrow%3CT%3E-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/core/borrow.rs.html#208">source</a><ahref="#impl-Borrow%3CT%3E-for-T"class="anchor">§</a><h3class="code-header">impl<T><aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/borrow/trait.Borrow.html"title="trait core::borrow::Borrow">Borrow</a><T> for T<divclass="where">where
T: ?<aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.borrow"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/core/borrow.rs.html#210">source</a><ahref="#method.borrow"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.76.0/core/borrow/trait.Borrow.html#tymethod.borrow"class="fn">borrow</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&T</a></h4></section></summary><divclass='docblock'>Immutably borrows from an owned value. <ahref="https://doc.rust-lang.org/1.76.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-BorrowMut%3CT%3E-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/core/borrow.rs.html#216">source</a><ahref="#impl-BorrowMut%3CT%3E-for-T"class="anchor">§</a><h3class="code-header">impl<T><aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/borrow/trait.BorrowMut.html"title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<divclass="where">where
T: ?<aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.borrow_mut"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/core/borrow.rs.html#217">source</a><ahref="#method.borrow_mut"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.76.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut"class="fn">borrow_mut</a>(&mut self) -><aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&mut T</a></h4></section></summary><divclass='docblock'>Mutably borrows from an owned value. <ahref="https://doc.rust-lang.org/1.76.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-From%3CT%3E-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/core/convert/mod.rs.html#763">source</a><ahref="#impl-From%3CT%3E-for-T"class="anchor">§</a><h3class="code-header">impl<T><aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/convert/trait.From.html"title="trait core::convert::From">From</a><T> for T</h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.from-1"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/core/convert/mod.rs.html#766">source</a><ahref="#method.from-1"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.76.0/core/convert/trait.From.html#tymethod.from"class="fn">from</a>(t: T) -> T</h4></section></summary><divclass="docblock"><p>Returns the argument unchanged.</p>
</div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-Into%3CU%3E-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/core/convert/mod.rs.html#747-749">source</a><ahref="#impl-Into%3CU%3E-for-T"class="anchor">§</a><h3class="code-header">impl<T, U><aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><U> for T<divclass="where">where
<p>That is, this conversion is whatever the implementation of
<code><ahref="https://doc.rust-lang.org/1.76.0/core/convert/trait.From.html"title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p>
</div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-ToOwned-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/alloc/borrow.rs.html#83-85">source</a><ahref="#impl-ToOwned-for-T"class="anchor">§</a><h3class="code-header">impl<T><aclass="trait"href="https://doc.rust-lang.org/1.76.0/alloc/borrow/trait.ToOwned.html"title="trait alloc::borrow::ToOwned">ToOwned</a> for T<divclass="where">where
T: <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/clone/trait.Clone.html"title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle"open><summary><sectionid="associatedtype.Owned"class="associatedtype trait-impl"><ahref="#associatedtype.Owned"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.76.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned"class="associatedtype">Owned</a> = T</h4></section></summary><divclass='docblock'>The resulting type after obtaining ownership.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.to_owned"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/alloc/borrow.rs.html#88">source</a><ahref="#method.to_owned"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.76.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned"class="fn">to_owned</a>(&self) -> T</h4></section></summary><divclass='docblock'>Creates owned data from borrowed data, usually by cloning. <ahref="https://doc.rust-lang.org/1.76.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.clone_into"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/alloc/borrow.rs.html#92">source</a><ahref="#method.clone_into"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.76.0/alloc/borrow/trait.ToOwned.html#method.clone_into"class="fn">clone_into</a>(&self, target: <aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&mut T</a>)</h4></section></summary><divclass='docblock'>Uses borrowed data to replace owned data, usually by cloning. <ahref="https://doc.rust-lang.org/1.76.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-ToString-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/alloc/string.rs.html#2600">source</a><ahref="#impl-ToString-for-T"class="anchor">§</a><h3class="code-header">impl<T><aclass="trait"href="https://doc.rust-lang.org/1.76.0/alloc/string/trait.ToString.html"title="trait alloc::string::ToString">ToString</a> for T<divclass="where">where
T: <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Display.html"title="trait core::fmt::Display">Display</a> + ?<aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.to_string"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/alloc/string.rs.html#2606">source</a><ahref="#method.to_string"class="anchor">§</a><h4class="code-header">default fn <ahref="https://doc.rust-lang.org/1.76.0/alloc/string/trait.ToString.html#tymethod.to_string"class="fn">to_string</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.76.0/alloc/string/struct.String.html"title="struct alloc::string::String">String</a></h4></section></summary><divclass='docblock'>Converts the given value to a <code>String</code>. <ahref="https://doc.rust-lang.org/1.76.0/alloc/string/trait.ToString.html#tymethod.to_string">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-TryFrom%3CU%3E-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/core/convert/mod.rs.html#803-805">source</a><ahref="#impl-TryFrom%3CU%3E-for-T"class="anchor">§</a><h3class="code-header">impl<T, U><aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><U> for T<divclass="where">where
U: <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle"open><summary><sectionid="associatedtype.Error"class="associatedtype trait-impl"><ahref="#associatedtype.Error"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html#associatedtype.Error"class="associatedtype">Error</a> = <aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/convert/enum.Infallible.html"title="enum core::convert::Infallible">Infallible</a></h4></section></summary><divclass='docblock'>The type returned in the event of a conversion error.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.try_from"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/core/convert/mod.rs.html#810">source</a><ahref="#method.try_from"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html#tymethod.try_from"class="fn">try_from</a>(value: U) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><T, <T as <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><U>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><divclass='docblock'>Performs the conversion.</div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-TryInto%3CU%3E-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/core/convert/mod.rs.html#788-790">source</a><ahref="#impl-TryInto%3CU%3E-for-T"class="anchor">§</a><h3class="code-header">impl<T, U><aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryInto.html"title="trait core::convert::TryInto">TryInto</a><U> for T<divclass="where">where
U: <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle"open><summary><sectionid="associatedtype.Error-1"class="associatedtype trait-impl"><ahref="#associatedtype.Error-1"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryInto.html#associatedtype.Error"class="associatedtype">Error</a> = <U as <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><divclass='docblock'>The type returned in the event of a conversion error.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.try_into"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/core/convert/mod.rs.html#795">source</a><ahref="#method.try_into"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryInto.html#tymethod.try_into"class="fn">try_into</a>(self) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><U, <U as <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><divclass='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html>