<!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="Container for parse results."><title>ArgMatches in clap::parser - 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"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/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/index.html"><imgsrc="https://raw.githubusercontent.com/clap-rs/clap/master/assets/clap.png"alt="logo"></a><h2><ahref="../../clap/index.html">clap</a><spanclass="version">4.5.2</span></h2></div><h2class="location"><ahref="#">ArgMatches</a></h2><divclass="sidebar-elems"><section><h3><ahref="#implementations">Methods</a></h3><ulclass="block method"><li><ahref="#method.args_present">args_present</a></li><li><ahref="#method.contains_id">contains_id</a></li><li><ahref="#method.get_count">get_count</a></li><li><ahref="#method.get_flag">get_flag</a></li><li><ahref="#method.get_many">get_many</a></li><li><ahref="#method.get_occurrences">get_occurrences</a></li><li><ahref="#method.get_one">get_one</a></li><li><ahref="#method.get_raw">get_raw</a></li><li><ahref="#method.get_raw_occurrences">get_raw_occurrences</a></li><li><ahref="#method.ids">ids</a></li><li><ahref="#method.index_of">index_of</a></li><li><ahref="#method.indices_of">indices_of</a></li><li><ahref="#method.remove_many">remove_many</a></li><li><ahref="#method.remove_occurrences">remove_occurrences</a></li><li><ahref="#method.remove_one">remove_one</a></li><li><ahref="#method.remove_subcommand">remove_subcommand</a></li><li><ahref="#method.subcommand">subcommand</a></li><li><ahref="#method.subcommand_matches">subcommand_matches</a></li><li><ahref="#method.subcommand_name">subcommand_name</a></li><li><ahref="#method.try_contains_id">try_contains_id</a></li><li><ahref="#method.try_get_many">try_get_many</a></li><li><ahref="#method.try_get_occurrences">try_get_occurrences</a></li><li>
<main><divclass="width-limiter"><navclass="sub"><formclass="search-form"><span></span><divid="sidebar-button"tabindex="-1"><ahref="../../clap/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</a>::<wbr><ahref="index.html">parser</a>::<wbr><aclass="struct"href="#">ArgMatches</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/parser/matches/arg_matches.rs.html#67">source</a> · <buttonid="toggle-all-docs"title="collapse all docs">[<span>−</span>]</button></span></div><preclass="rust item-decl"><code>pub struct ArgMatches { <spanclass="comment">/* private fields */</span> }</code></pre><detailsclass="toggle top-doc"open><summaryclass="hideme"><span>Expand description</span></summary><divclass="docblock"><p>Container for parse results.</p>
<p>Used to get information about the arguments that were supplied to the program at runtime by
the user. New instances of this struct are obtained by using the <ahref="../struct.Command.html#method.get_matches"title="method clap::Command::get_matches"><code>Command::get_matches</code></a> family of
.get_matches(); <spanclass="comment">// builds the instance of ArgMatches
// to get information about the "cfg" argument we created, such as the value supplied we use
// various ArgMatches methods, such as [ArgMatches::get_one]
</span><spanclass="kw">if let </span><spanclass="prelude-val">Some</span>(c) = matches.get_one::<String>(<spanclass="string">"cfg"</span>) {
<spanclass="macro">println!</span>(<spanclass="string">"Value for -c: {c}"</span>);
}
<spanclass="comment">// The ArgMatches::get_one method returns an Option because the user may not have supplied
// that argument at runtime. But if we specified that the argument was "required" as we did
// with the "out" argument, we can safely unwrap because `clap` verifies that was actually
// used at runtime.
</span><spanclass="macro">println!</span>(<spanclass="string">"Value for --output: {}"</span>, matches.get_one::<String>(<spanclass="string">"out"</span>).unwrap());
<spanclass="comment">// You can check the presence of an argument's values
T: <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/any/trait.Any.html"title="trait core::any::Any">Any</a> + <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/clone/trait.Clone.html"title="trait core::clone::Clone">Clone</a> + <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html"title="trait core::marker::Send">Send</a> + <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html"title="trait core::marker::Sync">Sync</a> + 'static,</div></h4></section></summary><divclass="docblock"><p>Gets the value of a specific option or positional argument.</p>
<p>i.e. an argument that <ahref="../struct.Arg.html#method.num_args"title="method clap::Arg::num_args">takes an additional value</a> at runtime.</p>
<p>Returns an error if the wrong type was used.</p>
<p>Returns <code>None</code> if the option wasn’t present.</p>
<p><em>NOTE:</em> This will always return <code>Some(value)</code> if <ahref="../struct.Arg.html#method.default_value"title="method clap::Arg::default_value"><code>default_value</code></a> has been set.
<ahref="../struct.ArgMatches.html#method.value_source"title="method clap::ArgMatches::value_source"><code>ArgMatches::value_source</code></a> can be used to check if a value is present at runtime.</p>
<h5id="panic"><ahref="#panic">Panic</a></h5>
<p>If the argument definition and access mismatch. To handle this case programmatically, see
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_count"class="method"><aclass="src rightside"href="../../src/clap_builder/parser/matches/arg_matches.rs.html#144">source</a><h4class="code-header">pub fn <ahref="#method.get_count"class="fn">get_count</a>(&self, id: &<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.str.html">str</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.u8.html">u8</a></h4></section></summary><divclass="docblock"><p>Gets the value of a specific <ahref="../enum.ArgAction.html#variant.Count"title="variant clap::ArgAction::Count"><code>ArgAction::Count</code></a> flag</p>
<h5id="panic-1"><ahref="#panic-1">Panic</a></h5>
<p>If the argument’s action is not <ahref="../enum.ArgAction.html#variant.Count"title="variant clap::ArgAction::Count"><code>ArgAction::Count</code></a></p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_flag"class="method"><aclass="src rightside"href="../../src/clap_builder/parser/matches/arg_matches.rs.html#177">source</a><h4class="code-header">pub fn <ahref="#method.get_flag"class="fn">get_flag</a>(&self, id: &<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.str.html">str</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>Gets the value of a specific <ahref="../enum.ArgAction.html#variant.SetTrue"title="variant clap::ArgAction::SetTrue"><code>ArgAction::SetTrue</code></a> or <ahref="../enum.ArgAction.html#variant.SetFalse"title="variant clap::ArgAction::SetFalse"><code>ArgAction::SetFalse</code></a> flag</p>
<h5id="panic-2"><ahref="#panic-2">Panic</a></h5>
<p>If the argument’s action is not <ahref="../enum.ArgAction.html#variant.SetTrue"title="variant clap::ArgAction::SetTrue"><code>ArgAction::SetTrue</code></a> or <ahref="../enum.ArgAction.html#variant.SetFalse"title="variant clap::ArgAction::SetFalse"><code>ArgAction::SetFalse</code></a></p>
T: <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/any/trait.Any.html"title="trait core::any::Any">Any</a> + <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/clone/trait.Clone.html"title="trait core::clone::Clone">Clone</a> + <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html"title="trait core::marker::Send">Send</a> + <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html"title="trait core::marker::Sync">Sync</a> + 'static,</div></h4></section></summary><divclass="docblock"><p>Iterate over values of a specific option or positional argument.</p>
<p>i.e. an argument that takes multiple values at runtime.</p>
<p>Returns an error if the wrong type was used.</p>
<p>Returns <code>None</code> if the option wasn’t present.</p>
<h5id="panic-3"><ahref="#panic-3">Panic</a></h5>
<p>If the argument definition and access mismatch. To handle this case programmatically, see
T: <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/any/trait.Any.html"title="trait core::any::Any">Any</a> + <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/clone/trait.Clone.html"title="trait core::clone::Clone">Clone</a> + <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html"title="trait core::marker::Send">Send</a> + <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html"title="trait core::marker::Sync">Sync</a> + 'static,</div></h4></section></summary><divclass="docblock"><p>Iterate over the values passed to each occurrence of an option.</p>
<p>Each item is itself an iterator containing the arguments passed to a single occurrence
of the option.</p>
<p>If the option doesn’t support multiple occurrences, or there was only a single occurrence,
the iterator will only contain a single item.</p>
<p>Returns <code>None</code> if the option wasn’t present.</p>
<h5id="panics"><ahref="#panics">Panics</a></h5>
<p>If the argument definition and access mismatch (debug builds). To handle this case programmatically, see
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_raw"class="method"><aclass="src rightside"href="../../src/clap_builder/parser/matches/arg_matches.rs.html#310">source</a><h4class="code-header">pub fn <ahref="#method.get_raw"class="fn">get_raw</a>(&self, id: &<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.str.html">str</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="struct"href="struct.RawValues.html"title="struct clap::parser::RawValues">RawValues</a><'_>></h4></section></summary><divclass="docblock"><p>Iterate over the original argument values.</p>
<p>An <code>OsStr</code> on Unix-like systems is any series of bytes, regardless of whether or not they
contain valid UTF-8. Since <ahref="https://doc.rust-lang.org/1.76.0/alloc/string/struct.String.html"title="struct alloc::string::String"><code>String</code></a>s in Rust are guaranteed to be valid UTF-8, a valid
filename on a Unix system as an argument value may contain invalid UTF-8.</p>
<p>Returns <code>None</code> if the option wasn’t present.</p>
<h5id="panic-4"><ahref="#panic-4">Panic</a></h5>
<p>If the argument definition and access mismatch. To handle this case programmatically, see
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_raw_occurrences"class="method"><aclass="src rightside"href="../../src/clap_builder/parser/matches/arg_matches.rs.html#365">source</a><h4class="code-header">pub fn <ahref="#method.get_raw_occurrences"class="fn">get_raw_occurrences</a>(&self, id: &<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.str.html">str</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><RawOccurrences<'_>></h4></section></summary><divclass="docblock"><p>Iterate over the original values for each occurrence of an option.</p>
<p>Similar to <ahref="../struct.ArgMatches.html#method.get_occurrences"title="method clap::ArgMatches::get_occurrences"><code>ArgMatches::get_occurrences</code></a> but returns raw values.</p>
<p>An <code>OsStr</code> on Unix-like systems is any series of bytes, regardless of whether or not they
contain valid UTF-8. Since <ahref="https://doc.rust-lang.org/1.76.0/alloc/string/struct.String.html"title="struct alloc::string::String"><code>String</code></a>s in Rust are guaranteed to be valid UTF-8, a valid
filename on a Unix system as an argument value may contain invalid UTF-8.</p>
<p>Returns <code>None</code> if the option wasn’t present.</p>
<h5id="panic-5"><ahref="#panic-5">Panic</a></h5>
<p>If the argument definition and access mismatch. To handle this case programmatically, see
T: <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/any/trait.Any.html"title="trait core::any::Any">Any</a> + <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/clone/trait.Clone.html"title="trait core::clone::Clone">Clone</a> + <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html"title="trait core::marker::Send">Send</a> + <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html"title="trait core::marker::Sync">Sync</a> + 'static,</div></h4></section></summary><divclass="docblock"><p>Returns the value of a specific option or positional argument.</p>
<p>i.e. an argument that <ahref="../struct.Arg.html#method.num_args"title="method clap::Arg::num_args">takes an additional value</a> at runtime.</p>
<p>Returns an error if the wrong type was used. No item will have been removed.</p>
<p>Returns <code>None</code> if the option wasn’t present.</p>
<p><em>NOTE:</em> This will always return <code>Some(value)</code> if <ahref="../struct.Arg.html#method.default_value"title="method clap::Arg::default_value"><code>default_value</code></a> has been set.
<ahref="../struct.ArgMatches.html#method.value_source"title="method clap::ArgMatches::value_source"><code>ArgMatches::value_source</code></a> can be used to check if a value is present at runtime.</p>
<h5id="panic-6"><ahref="#panic-6">Panic</a></h5>
<p>If the argument definition and access mismatch. To handle this case programmatically, see
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.contains_id"class="method"><aclass="src rightside"href="../../src/clap_builder/parser/matches/arg_matches.rs.html#513">source</a><h4class="code-header">pub fn <ahref="#method.contains_id"class="fn">contains_id</a>(&self, id: &<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.str.html">str</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>Check if values are present for the argument or group id</p>
<p><em>NOTE:</em> This will always return <code>true</code> if <ahref="../struct.Arg.html#method.default_value"title="method clap::Arg::default_value"><code>default_value</code></a> has been set.
<ahref="../struct.ArgMatches.html#method.value_source"title="method clap::ArgMatches::value_source"><code>ArgMatches::value_source</code></a> can be used to check if a value is present at runtime.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.args_present"class="method"><aclass="src rightside"href="../../src/clap_builder/parser/matches/arg_matches.rs.html#565">source</a><h4class="code-header">pub fn <ahref="#method.args_present"class="fn">args_present</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>Check if any args were present on the command line</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.value_source"class="method"><aclass="src rightside"href="../../src/clap_builder/parser/matches/arg_matches.rs.html#594">source</a><h4class="code-header">pub fn <ahref="#method.value_source"class="fn">value_source</a>(&self, id: &<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.str.html">str</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="enum.ValueSource.html"title="enum clap::parser::ValueSource">ValueSource</a>></h4></section></summary><divclass="docblock"><p>Report where argument value came from</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.index_of"class="method"><aclass="src rightside"href="../../src/clap_builder/parser/matches/arg_matches.rs.html#748">source</a><h4class="code-header">pub fn <ahref="#method.index_of"class="fn">index_of</a>(&self, id: &<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.str.html">str</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="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>></h4></section></summary><divclass="docblock"><p>The first index of that an argument showed up.</p>
<p>Indices are similar to argv indices, but are not exactly 1:1.</p>
<p>For flags (i.e. those arguments which don’t have an associated value), indices refer
to occurrence of the switch, such as <code>-f</code>, or <code>--flag</code>. However, for options the indices
refer to the <em>values</em><code>-o val</code> would therefore not represent two distinct indices, only the
index for <code>val</code> would be recorded. This is by design.</p>
<p>Besides the flag/option discrepancy, the primary difference between an argv index and clap
index, is that clap continues counting once all arguments have properly separated, whereas
an argv index does not.</p>
<p>The examples should clear this up.</p>
<p><em>NOTE:</em> If an argument is allowed multiple times, this method will only give the <em>first</em>
index. See <ahref="../struct.ArgMatches.html#method.indices_of"title="method clap::ArgMatches::indices_of"><code>ArgMatches::indices_of</code></a>.</p>
<p>The last part to mention is when values are sent in multiple groups with a <ahref="../struct.Arg.html#method.value_delimiter"title="method clap::Arg::value_delimiter">delimiter</a>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.indices_of"class="method"><aclass="src rightside"href="../../src/clap_builder/parser/matches/arg_matches.rs.html#833">source</a><h4class="code-header">pub fn <ahref="#method.indices_of"class="fn">indices_of</a>(&self, id: &<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.str.html">str</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="struct"href="struct.Indices.html"title="struct clap::parser::Indices">Indices</a><'_>></h4></section></summary><divclass="docblock"><p>All indices an argument appeared at when parsing.</p>
<p>Indices are similar to argv indices, but are not exactly 1:1.</p>
<p>For flags (i.e. those arguments which don’t have an associated value), indices refer
to occurrence of the switch, such as <code>-f</code>, or <code>--flag</code>. However, for options the indices
refer to the <em>values</em><code>-o val</code> would therefore not represent two distinct indices, only the
index for <code>val</code> would be recorded. This is by design.</p>
<p><em>NOTE:</em> For more information about how clap indices compared to argv indices, see
</div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-ArgMatches-1"class="impl"><aclass="src rightside"href="../../src/clap_builder/parser/matches/arg_matches.rs.html#844">source</a><ahref="#impl-ArgMatches-1"class="anchor">§</a><h3class="code-header">impl <aclass="struct"href="../struct.ArgMatches.html"title="struct clap::ArgMatches">ArgMatches</a></h3></section></summary><divclass="docblock"><h4id="subcommands"><ahref="#subcommands">Subcommands</a></h4></div><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.subcommand"class="method"><aclass="src rightside"href="../../src/clap_builder/parser/matches/arg_matches.rs.html#900">source</a><h4class="code-header">pub fn <ahref="#method.subcommand"class="fn">subcommand</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>, &<aclass="struct"href="../struct.ArgMatches.html"title="struct clap::ArgMatches">ArgMatches</a>)></h4></section></summary><divclass="docblock"><p>The name and <code>ArgMatches</code> of the current <ahref="../struct.Command.html#method.subcommand"title="method clap::Command::subcommand">subcommand</a>.</p>
<p>Subcommand values are put in a child <ahref="../struct.ArgMatches.html"title="struct clap::ArgMatches"><code>ArgMatches</code></a></p>
<p>Returns <code>None</code> if the subcommand wasn’t present at runtime,</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.remove_subcommand"class="method"><aclass="src rightside"href="../../src/clap_builder/parser/matches/arg_matches.rs.html#960">source</a><h4class="code-header">pub fn <ahref="#method.remove_subcommand"class="fn">remove_subcommand</a>(&mut 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/string/struct.String.html"title="struct alloc::string::String">String</a>, <aclass="struct"href="../struct.ArgMatches.html"title="struct clap::ArgMatches">ArgMatches</a>)></h4></section></summary><divclass="docblock"><p>Return the name and <code>ArgMatches</code> of the current <ahref="../struct.Command.html#method.subcommand"title="method clap::Command::subcommand">subcommand</a>.</p>
<p>Subcommand values are put in a child <ahref="../struct.ArgMatches.html"title="struct clap::ArgMatches"><code>ArgMatches</code></a></p>
<p>Returns <code>None</code> if the subcommand wasn’t present at runtime,</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.subcommand_name"class="method"><aclass="src rightside"href="../../src/clap_builder/parser/matches/arg_matches.rs.html#1033">source</a><h4class="code-header">pub fn <ahref="#method.subcommand_name"class="fn">subcommand_name</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>The name of the current <ahref="../struct.Command.html#method.subcommand"title="method clap::Command::subcommand">subcommand</a>.</p>
<p>Returns <code>None</code> if the subcommand wasn’t present at runtime,</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><RawOccurrences<'_>>, <aclass="enum"href="enum.MatchesError.html"title="enum clap::parser::MatchesError">MatchesError</a>></h4></section></summary><divclass="docblock"><p>Non-panicking version of <ahref="../struct.ArgMatches.html#method.get_raw_occurrences"title="method clap::ArgMatches::get_raw_occurrences"><code>ArgMatches::get_raw_occurrences</code></a></p>
T: <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/any/trait.Any.html"title="trait core::any::Any">Any</a> + <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/clone/trait.Clone.html"title="trait core::clone::Clone">Clone</a> + <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html"title="trait core::marker::Send">Send</a> + <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html"title="trait core::marker::Sync">Sync</a> + 'static,</div></h4></section></summary><divclass="docblock"><p>Non-panicking version of <ahref="../struct.ArgMatches.html#method.remove_occurrences"title="method clap::ArgMatches::remove_occurrences"><code>ArgMatches::remove_occurrences</code></a></p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.try_contains_id"class="method"><aclass="src rightside"href="../../src/clap_builder/parser/matches/arg_matches.rs.html#1198">source</a><h4class="code-header">pub fn <ahref="#method.try_contains_id"class="fn">try_contains_id</a>(&self, id: &<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.str.html">str</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.bool.html">bool</a>, <aclass="enum"href="enum.MatchesError.html"title="enum clap::parser::MatchesError">MatchesError</a>></h4></section></summary><divclass="docblock"><p>Non-panicking version of <ahref="../struct.ArgMatches.html#method.contains_id"title="method clap::ArgMatches::contains_id"><code>ArgMatches::contains_id</code></a></p>
</div></details></div></details></div><h2id="trait-implementations"class="section-header">Trait Implementations<ahref="#trait-implementations"class="anchor">§</a></h2><divid="trait-implementations-list"><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-Clone-for-ArgMatches"class="impl"><aclass="src rightside"href="../../src/clap_builder/parser/matches/arg_matches.rs.html#66">source</a><ahref="#impl-Clone-for-ArgMatches"class="anchor">§</a><h3class="code-header">impl <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/clone/trait.Clone.html"title="trait core::clone::Clone">Clone</a> for <aclass="struct"href="../struct.ArgMatches.html"title="struct clap::ArgMatches">ArgMatches</a></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.clone"class="method trait-impl"><aclass="src rightside"href="../../src/clap_builder/parser/matches/arg_matches.rs.html#66">source</a><ahref="#method.clone"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.76.0/core/clone/trait.Clone.html#tymethod.clone"class="fn">clone</a>(&self) -><aclass="struct"href="../struct.ArgMatches.html"title="struct clap::ArgMatches">ArgMatches</a></h4></section></summary><divclass='docblock'>Returns a copy of the value. <ahref="https://doc.rust-lang.org/1.76.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.clone_from"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/clone.rs.html#169">source</a></span><ahref="#method.clone_from"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.76.0/core/clone/trait.Clone.html#method.clone_from"class="fn">clone_from</a>(&mut self, source: <aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&Self</a>)</h4></section></summary><divclass='docblock'>Performs copy-assignment from <code>source</code>. <ahref="https://doc.rust-lang.org/1.76.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-Debug-for-ArgMatches"class="impl"><aclass="src rightside"href="../../src/clap_builder/parser/matches/arg_matches.rs.html#66">source</a><ahref="#impl-Debug-for-ArgMatches"class="anchor">§</a><h3class="code-header">impl <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Debug.html"title="trait core::fmt::Debug">Debug</a> for <aclass="struct"href="../struct.ArgMatches.html"title="struct clap::ArgMatches">ArgMatches</a></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.fmt"class="method trait-impl"><aclass="src rightside"href="../../src/clap_builder/parser/matches/arg_matches.rs.html#66">source</a><ahref="#method.fmt"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Debug.html#tymethod.fmt"class="fn">fmt</a>(&self, f: &mut <aclass="struct"href="https://doc.rust-lang.org/1.76.0/core/fmt/struct.Formatter.html"title="struct core::fmt::Formatter">Formatter</a><'_>) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.unit.html">()</a>, <aclass="struct"href="https://doc.rust-lang.org/1.76.0/core/fmt/struct.Error.html"title="struct core::fmt::Error">Error</a>></h4></section></summary><divclass='docblock'>Formats the value using the given formatter. <ahref="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"open>
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><sectionid="impl-Eq-for-ArgMatches"class="impl"><aclass="src rightside"href="../../src/clap_builder/parser/matches/arg_matches.rs.html#66">source</a><ahref="#impl-Eq-for-ArgMatches"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.ArgMatches.html"title="struct clap::ArgMatches">ArgMatches</a></h3></section><sectionid="impl-StructuralEq-for-ArgMatches"class="impl"><aclass="src rightside"href="../../src/clap_builder/parser/matches/arg_matches.rs.html#66">source</a><ahref="#impl-StructuralEq-for-ArgMatches"class="anchor">§</a><h3class="code-header">impl <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/marker/trait.StructuralEq.html"title="trait core::marker::StructuralEq">StructuralEq</a> for <aclass="struct"href="../struct.ArgMatches.html"title="struct clap::ArgMatches">ArgMatches</a></h3></section><sectionid="impl-StructuralPartialEq-for-ArgMatches"class="impl"><aclass="src rightside"href="../../src/clap_builder/parser/matches/arg_matches.rs.html#66">source</a><ahref="#impl-StructuralPartialEq-for-ArgMatches"class="anchor">§</a><h3class="code-header">impl <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/marker/trait.StructuralPartialEq.html"title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <aclass="struct"href="../struct.ArgMatches.html"title="struct clap::ArgMatches">ArgMatches</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-ArgMatches"class="impl"><ahref="#impl-RefUnwindSafe-for-ArgMatches"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.ArgMatches.html"title="struct clap::ArgMatches">ArgMatches</a></h3></section><sectionid="impl-Send-for-ArgMatches"class="impl"><ahref="#impl-Send-for-ArgMatches"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.ArgMatches.html"title="struct clap::ArgMatches">ArgMatches</a></h3></section><sectionid="impl-Sync-for-ArgMatches"class="impl"><ahref="#impl-Sync-for-ArgMatches"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.ArgMatches.html"title="struct clap::ArgMatches">ArgMatches</a></h3></section><sectionid="impl-Unpin-for-ArgMatches"class="impl"><ahref="#impl-Unpin-for-ArgMatches"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.ArgMatches.html"title="struct clap::ArgMatches">ArgMatches</a></h3></section><sectionid="impl-UnwindSafe-for-ArgMatches"class="impl"><ahref="#impl-UnwindSafe-for-ArgMatches"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.ArgMatches.html"title="struct clap::ArgMatches">ArgMatches</a></h3></section></div><h2id="blanket-implementations"class="section-header">Blanket Implementations<ahref="#blanket-implementations"class="anchor">§</a></h2><divid="blanket-implementations-list"><detailsclass="toggleimplementor
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"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"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-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><scripttype="text/json"id="notable-traits-data">{"IdsRef<'_>":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.IdsRef.html\" title=\"struct clap::parser::IdsRef\">IdsRef</a><'a></code></h3><pre><code><div class=\"where\">impl<'a> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.76.0/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\">Iterator</a> for <a class=\"struct\" href=\"struct.IdsRef.html\" title=\"struct clap::parser::IdsRef\">IdsRef</a><'a></div><div class=\"where\"> type <a href=\"https://doc.rust-lang.org/1.76.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item\" class=\"associatedtype\">Item</a> = &'a <a class=\"struct\" href=\"../struct.Id.html\" title=\"struct clap::Id\">Id</a>;</div>"}</script></section></div></main></body></html>