77 lines
26 KiB
HTML
77 lines
26 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Parse command-line arguments into `Self`."><meta name="keywords" content="rust, rustlang, rust-lang, Parser"><title>Parser in clap - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../dark.css" disabled><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../storage.js"></script><script src="../crates.js"></script><script defer src="../main.js"></script>
|
||
<noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../favicon.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a class="sidebar-logo" href="../clap/index.html"><div class="logo-container"><img src="https://raw.githubusercontent.com/clap-rs/clap/master/assets/clap.png" alt="logo"></div>
|
||
</a><h2 class="location">Trait Parser</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#provided-methods">Provided Methods</a></h3><div class="sidebar-links"><a href="#method.parse">parse</a><a href="#method.parse_from">parse_from</a><a href="#method.try_parse">try_parse</a><a href="#method.try_parse_from">try_parse_from</a><a href="#method.try_update_from">try_update_from</a><a href="#method.update_from">update_from</a></div><h3 class="sidebar-title"><a href="#foreign-impls">Implementations on Foreign Types</a></h3><div class="sidebar-links"><a href="#impl-Parser-for-Box%3CT%3E">Box<T></a></div><h3 class="sidebar-title"><a href="#implementors">Implementors</a></h3></div><h2 class="location">Other items in<br><a href="index.html">clap</a></h2><div id="sidebar-vars" data-name="Parser" data-ty="trait" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../clap/index.html"><img src="https://raw.githubusercontent.com/clap-rs/clap/master/assets/clap.png" alt="logo"></a><nav class="sub"><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><h1 class="fqn"><span class="in-band">Trait <a href="index.html">clap</a>::<wbr><a class="trait" href="#">Parser</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/clap/derive.rs.html#79-227" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust trait"><code>pub trait Parser: <a class="trait" href="trait.FromArgMatches.html" title="trait clap::FromArgMatches">FromArgMatches</a> + <a class="trait" href="trait.CommandFactory.html" title="trait clap::CommandFactory">CommandFactory</a> + <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> {
|
||
fn <a href="#method.parse" class="fnname">parse</a>() -> Self { ... }
|
||
<div class="item-spacer"></div> fn <a href="#method.try_parse" class="fnname">try_parse</a>() -> <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, <a class="struct" href="error/struct.Error.html" title="struct clap::error::Error">Error</a>> { ... }
|
||
<div class="item-spacer"></div> fn <a href="#method.parse_from" class="fnname">parse_from</a><I, T>(itr: I) -> Self<br> <span class="where">where<br> I: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = T>,<br> T: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="https://doc.rust-lang.org/1.59.0/std/ffi/os_str/struct.OsString.html" title="struct std::ffi::os_str::OsString">OsString</a>> + <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a></span>,
|
||
{ ... }
|
||
<div class="item-spacer"></div> fn <a href="#method.try_parse_from" class="fnname">try_parse_from</a><I, T>(itr: I) -> <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, <a class="struct" href="error/struct.Error.html" title="struct clap::error::Error">Error</a>><br> <span class="where">where<br> I: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = T>,<br> T: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="https://doc.rust-lang.org/1.59.0/std/ffi/os_str/struct.OsString.html" title="struct std::ffi::os_str::OsString">OsString</a>> + <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a></span>,
|
||
{ ... }
|
||
<div class="item-spacer"></div> fn <a href="#method.update_from" class="fnname">update_from</a><I, T>(&mut self, itr: I)<br> <span class="where">where<br> I: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = T>,<br> T: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="https://doc.rust-lang.org/1.59.0/std/ffi/os_str/struct.OsString.html" title="struct std::ffi::os_str::OsString">OsString</a>> + <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a></span>,
|
||
{ ... }
|
||
<div class="item-spacer"></div> fn <a href="#method.try_update_from" class="fnname">try_update_from</a><I, T>(&mut self, itr: I) -> <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.unit.html">()</a>, <a class="struct" href="error/struct.Error.html" title="struct clap::error::Error">Error</a>><br> <span class="where">where<br> I: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = T>,<br> T: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="https://doc.rust-lang.org/1.59.0/std/ffi/os_str/struct.OsString.html" title="struct std::ffi::os_str::OsString">OsString</a>> + <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a></span>,
|
||
{ ... }
|
||
}</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Parse command-line arguments into <code>Self</code>.</p>
|
||
<p>The primary one-stop-shop trait used to create an instance of a <code>clap</code>
|
||
<a href="type.Command.html" title="Command"><code>Command</code></a>, conduct the parsing, and turn the resulting <a href="struct.ArgMatches.html" title="ArgMatches"><code>ArgMatches</code></a> back
|
||
into concrete instance of the user struct.</p>
|
||
<p>This trait is primarily a convenience on top of <a href="trait.FromArgMatches.html" title="FromArgMatches"><code>FromArgMatches</code></a> +
|
||
<a href="trait.CommandFactory.html" title="CommandFactory"><code>CommandFactory</code></a> which uses those two underlying traits to build the two
|
||
fundamental functions <code>parse</code> which uses the <code>std::env::args_os</code> iterator,
|
||
and <code>parse_from</code> which allows the consumer to supply the iterator (along
|
||
with fallible options for each).</p>
|
||
<p>See also <a href="trait.Subcommand.html" title="Subcommand"><code>Subcommand</code></a> and <a href="trait.Args.html" title="Args"><code>Args</code></a>.</p>
|
||
<p>See the
|
||
<a href="https://github.com/clap-rs/clap/blob/v3.1.6/examples/derive_ref/README.md">derive reference</a>
|
||
for attributes and best practices.</p>
|
||
<p><strong>NOTE:</strong> Deriving requires the <code>derive</code> feature flag</p>
|
||
<h2 id="examples" class="section-header"><a href="#examples">Examples</a></h2>
|
||
<p>The following example creates a <code>Context</code> struct that would be used
|
||
throughout the application representing the normalized values coming from
|
||
the CLI.</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="doccomment">/// My super CLI</span>
|
||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">clap::Parser</span>)]</span>
|
||
<span class="attribute">#[<span class="ident">clap</span>(<span class="ident">name</span> <span class="op">=</span> <span class="string">"demo"</span>)]</span>
|
||
<span class="kw">struct</span> <span class="ident">Context</span> {
|
||
<span class="doccomment">/// More verbose output</span>
|
||
<span class="attribute">#[<span class="ident">clap</span>(<span class="ident">long</span>)]</span>
|
||
<span class="ident">verbose</span>: <span class="ident">bool</span>,
|
||
<span class="doccomment">/// An optional name</span>
|
||
<span class="attribute">#[<span class="ident">clap</span>(<span class="ident">short</span>, <span class="ident">long</span>)]</span>
|
||
<span class="ident">name</span>: <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">String</span><span class="op">></span>,
|
||
}</code></pre></div>
|
||
<p>The equivalent <a href="type.Command.html" title="Command"><code>Command</code></a> struct + <code>From</code> implementation:</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="ident">Command::new</span>(<span class="string">"demo"</span>)
|
||
.<span class="ident">about</span>(<span class="string">"My super CLI"</span>)
|
||
.<span class="ident">arg</span>(<span class="ident">Arg::new</span>(<span class="string">"verbose"</span>)
|
||
.<span class="ident">long</span>(<span class="string">"verbose"</span>)
|
||
.<span class="ident">help</span>(<span class="string">"More verbose output"</span>))
|
||
.<span class="ident">arg</span>(<span class="ident">Arg::new</span>(<span class="string">"name"</span>)
|
||
.<span class="ident">long</span>(<span class="string">"name"</span>)
|
||
.<span class="ident">short</span>(<span class="string">'n'</span>)
|
||
.<span class="ident">help</span>(<span class="string">"An optional name"</span>)
|
||
.<span class="ident">takes_value</span>(<span class="bool-val">true</span>));
|
||
|
||
<span class="kw">struct</span> <span class="ident">Context</span> {
|
||
<span class="ident">verbose</span>: <span class="ident">bool</span>,
|
||
<span class="ident">name</span>: <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">String</span><span class="op">></span>,
|
||
}
|
||
|
||
<span class="kw">impl</span> <span class="ident">From</span><span class="op"><</span><span class="ident">ArgMatches</span><span class="op">></span> <span class="kw">for</span> <span class="ident">Context</span> {
|
||
<span class="kw">fn</span> <span class="ident">from</span>(<span class="ident">m</span>: <span class="ident">ArgMatches</span>) -> <span class="self">Self</span> {
|
||
<span class="ident">Context</span> {
|
||
<span class="ident">verbose</span>: <span class="ident">m</span>.<span class="ident">is_present</span>(<span class="string">"verbose"</span>),
|
||
<span class="ident">name</span>: <span class="ident">m</span>.<span class="ident">value_of</span>(<span class="string">"name"</span>).<span class="ident">map</span>(<span class="op">|</span><span class="ident">n</span><span class="op">|</span> <span class="ident">n</span>.<span class="ident">to_owned</span>()),
|
||
}
|
||
}
|
||
}</code></pre></div>
|
||
</div></details><h2 id="provided-methods" class="small-section-header">Provided methods<a href="#provided-methods" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle" open><summary><div id="method.parse" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/derive.rs.html#81-93" title="goto source code">[src]</a></div><h4 class="code-header">fn <a href="#method.parse" class="fnname">parse</a>() -> Self</h4></div></summary><div class="docblock"><p>Parse from <code>std::env::args_os()</code>, exit on error</p>
|
||
</div></details><details class="rustdoc-toggle" open><summary><div id="method.try_parse" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/derive.rs.html#96-99" title="goto source code">[src]</a></div><h4 class="code-header">fn <a href="#method.try_parse" class="fnname">try_parse</a>() -> <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, <a class="struct" href="error/struct.Error.html" title="struct clap::error::Error">Error</a>></h4></div></summary><div class="docblock"><p>Parse from <code>std::env::args_os()</code>, return Err on error.</p>
|
||
</div></details><details class="rustdoc-toggle" open><summary><div id="method.parse_from" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/derive.rs.html#102-118" title="goto source code">[src]</a></div><h4 class="code-header">fn <a href="#method.parse_from" class="fnname">parse_from</a><I, T>(itr: I) -> Self <span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = T>,<br> T: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="https://doc.rust-lang.org/1.59.0/std/ffi/os_str/struct.OsString.html" title="struct std::ffi::os_str::OsString">OsString</a>> + <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, </span></h4></div></summary><div class="docblock"><p>Parse from iterator, exit on error</p>
|
||
</div></details><details class="rustdoc-toggle" open><summary><div id="method.try_parse_from" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/derive.rs.html#121-128" title="goto source code">[src]</a></div><h4 class="code-header">fn <a href="#method.try_parse_from" class="fnname">try_parse_from</a><I, T>(itr: I) -> <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, <a class="struct" href="error/struct.Error.html" title="struct clap::error::Error">Error</a>> <span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = T>,<br> T: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="https://doc.rust-lang.org/1.59.0/std/ffi/os_str/struct.OsString.html" title="struct std::ffi::os_str::OsString">OsString</a>> + <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, </span></h4></div></summary><div class="docblock"><p>Parse from iterator, return Err on error.</p>
|
||
</div></details><details class="rustdoc-toggle" open><summary><div id="method.update_from" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/derive.rs.html#131-144" title="goto source code">[src]</a></div><h4 class="code-header">fn <a href="#method.update_from" class="fnname">update_from</a><I, T>(&mut self, itr: I) <span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = T>,<br> T: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="https://doc.rust-lang.org/1.59.0/std/ffi/os_str/struct.OsString.html" title="struct std::ffi::os_str::OsString">OsString</a>> + <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, </span></h4></div></summary><div class="docblock"><p>Update from iterator, exit on error</p>
|
||
</div></details><details class="rustdoc-toggle" open><summary><div id="method.try_update_from" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/derive.rs.html#147-155" title="goto source code">[src]</a></div><h4 class="code-header">fn <a href="#method.try_update_from" class="fnname">try_update_from</a><I, T>(&mut self, itr: I) -> <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.unit.html">()</a>, <a class="struct" href="error/struct.Error.html" title="struct clap::error::Error">Error</a>> <span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = T>,<br> T: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="https://doc.rust-lang.org/1.59.0/std/ffi/os_str/struct.OsString.html" title="struct std::ffi::os_str::OsString">OsString</a>> + <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, </span></h4></div></summary><div class="docblock"><p>Update from iterator, return Err on error.</p>
|
||
</div></details></div><h2 id="foreign-impls" class="small-section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Parser-for-Box%3CT%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/derive.rs.html#443-467" title="goto source code">[src]</a></div><a href="#impl-Parser-for-Box%3CT%3E" class="anchor"></a><h3 class="code-header in-band">impl<T: <a class="trait" href="trait.Parser.html" title="trait clap::Parser">Parser</a>> <a class="trait" href="trait.Parser.html" title="trait clap::Parser">Parser</a> for <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><T></h3></div></summary><div class="impl-items"><div id="method.parse-1" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/derive.rs.html#444-446" title="goto source code">[src]</a></div><a href="#method.parse-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.parse" class="fnname">parse</a>() -> Self</h4></div><div id="method.try_parse-1" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/derive.rs.html#448-450" title="goto source code">[src]</a></div><a href="#method.try_parse-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.try_parse" class="fnname">try_parse</a>() -> <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, <a class="struct" href="error/struct.Error.html" title="struct clap::error::Error">Error</a>></h4></div><div id="method.parse_from-1" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/derive.rs.html#452-458" title="goto source code">[src]</a></div><a href="#method.parse_from-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.parse_from" class="fnname">parse_from</a><I, It>(itr: I) -> Self <span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = It>,<br> It: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="https://doc.rust-lang.org/1.59.0/std/ffi/os_str/struct.OsString.html" title="struct std::ffi::os_str::OsString">OsString</a>> + <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, </span></h4></div><div id="method.try_parse_from-1" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/clap/derive.rs.html#460-466" title="goto source code">[src]</a></div><a href="#method.try_parse_from-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.try_parse_from" class="fnname">try_parse_from</a><I, It>(itr: I) -> <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, <a class="struct" href="error/struct.Error.html" title="struct clap::error::Error">Error</a>> <span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = It>,<br> It: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="https://doc.rust-lang.org/1.59.0/std/ffi/os_str/struct.OsString.html" title="struct std::ffi::os_str::OsString">OsString</a>> + <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, </span></h4></div></div></details><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"></div><script type="text/javascript" src="../implementors/clap/trait.Parser.js" async></script></section><section id="search" class="content hidden"></section></div></main><div id="rustdoc-vars" data-root-path="../" data-current-crate="clap" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.59.0 (9d1b2106e 2022-02-23)" ></div>
|
||
</body></html> |