mirror of
https://github.com/clap-rs/clap
synced 2024-12-12 22:02:35 +00:00
Rebuilt docs for v0.4.2
This commit is contained in:
parent
b77920304c
commit
da5a759375
7 changed files with 11 additions and 11 deletions
|
@ -55,7 +55,7 @@
|
|||
<p>After defining a list of possible valid arguments you get a list of matches that the user supplied at runtime. You can then use this list to
|
||||
determine the functioning of your program.</p>
|
||||
|
||||
<p>Example:</p>
|
||||
<p># Example</p>
|
||||
<pre id='rust-example-rendered' class='rust '>
|
||||
<span class='kw'>use</span> <span class='ident'>clap</span>::{<span class='ident'>Arg</span>, <span class='ident'>App</span>, <span class='ident'>SubCommand</span>};
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
<p>Stores a list of all posisble arguments, as well as information displayed to the user such as
|
||||
help and versioning information.</p>
|
||||
|
||||
<p>Example:</p>
|
||||
<p># Example</p>
|
||||
<pre id='rust-example-rendered' class='rust '>
|
||||
<span class='kw'>let</span> <span class='ident'>myprog</span> <span class='op'>=</span> <span class='ident'>App</span>::<span class='ident'>new</span>(<span class='string'>"myprog"</span>)
|
||||
.<span class='ident'>author</span>(<span class='string'>"Me, me@mail.com"</span>)
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
<section id='main' class="content struct">
|
||||
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>clap</a>::<wbr><a class='struct' href=''>Arg</a><wbr></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="collapse-all" href="#">[-]</a> <a id="expand-all" href="#">[+]</a>
|
||||
</span><a id='src-4820' href='../src/clap/arg.rs.html#21-53'>[src]</a></span></h1>
|
||||
</span><a id='src-4825' href='../src/clap/arg.rs.html#21-53'>[src]</a></span></h1>
|
||||
<pre class='rust struct'>pub struct Arg {
|
||||
pub name: &'static <a href='http://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>,
|
||||
pub short: <a class='enum' href='http://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a href='http://doc.rust-lang.org/nightly/std/primitive.char.html'>char</a>>,
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
<section id='main' class="content struct">
|
||||
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>clap</a>::<wbr><a class='struct' href=''>ArgMatches</a><wbr></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="collapse-all" href="#">[-]</a> <a id="expand-all" href="#">[+]</a>
|
||||
</span><a id='src-4545' href='../src/clap/argmatches.rs.html#60-66'>[src]</a></span></h1>
|
||||
</span><a id='src-4550' href='../src/clap/argmatches.rs.html#60-66'>[src]</a></span></h1>
|
||||
<pre class='rust struct'>pub struct ArgMatches {
|
||||
pub matches_of: &'static <a href='http://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>,
|
||||
pub flags: <a class='struct' href='http://doc.rust-lang.org/nightly/std/collections/hash/map/struct.HashMap.html' title='std::collections::hash::map::HashMap'>HashMap</a><&'static <a href='http://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>, FlagArg>,
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
<section id='main' class="content struct">
|
||||
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>clap</a>::<wbr><a class='struct' href=''>SubCommand</a><wbr></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="collapse-all" href="#">[-]</a> <a id="expand-all" href="#">[+]</a>
|
||||
</span><a id='src-5519' href='../src/clap/subcommand.rs.html#23-26'>[src]</a></span></h1>
|
||||
</span><a id='src-5524' href='../src/clap/subcommand.rs.html#23-26'>[src]</a></span></h1>
|
||||
<pre class='rust struct'>pub struct SubCommand {
|
||||
pub name: &'static <a href='http://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>,
|
||||
pub matches: <a class='struct' href='../clap/struct.ArgMatches.html' title='clap::ArgMatches'>ArgMatches</a>,
|
||||
|
|
|
@ -833,7 +833,7 @@
|
|||
<span class='doccomment'>/// Stores a list of all posisble arguments, as well as information displayed to the user such as</span>
|
||||
<span class='doccomment'>/// help and versioning information.</span>
|
||||
<span class='doccomment'>///</span>
|
||||
<span class='doccomment'>/// Example:</span>
|
||||
<span class='doccomment'>/// # Example</span>
|
||||
<span class='doccomment'>///</span>
|
||||
<span class='doccomment'>/// ```no_run</span>
|
||||
<span class='doccomment'>/// # use clap::{App, Arg};</span>
|
||||
|
@ -1420,7 +1420,7 @@
|
|||
<span class='ident'>occurrences</span>: <span class='number'>1</span>
|
||||
});
|
||||
}
|
||||
<span class='kw'>if</span> <span class='self'>self</span>.<span class='ident'>needs_subcmd_help</span> {
|
||||
<span class='kw'>if</span> <span class='self'>self</span>.<span class='ident'>needs_subcmd_help</span> <span class='op'>&&</span> <span class='op'>!</span> <span class='self'>self</span>.<span class='ident'>subcommands</span>.<span class='ident'>is_empty</span>() {
|
||||
<span class='self'>self</span>.<span class='ident'>subcommands</span>.<span class='ident'>insert</span>(<span class='string'>"help"</span>, <span class='ident'>Box</span>::<span class='ident'>new</span>(<span class='ident'>App</span>::<span class='ident'>new</span>(<span class='string'>"help"</span>).<span class='ident'>about</span>(<span class='string'>"Prints this message"</span>)));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -212,7 +212,7 @@
|
|||
<span class='doccomment'>//! After defining a list of possible valid arguments you get a list of matches that the user supplied at runtime. You can then use this list to</span>
|
||||
<span class='doccomment'>//! determine the functioning of your program.</span>
|
||||
<span class='doccomment'>//!</span>
|
||||
<span class='doccomment'>//! Example:</span>
|
||||
<span class='doccomment'>//! # Example</span>
|
||||
<span class='doccomment'>//! </span>
|
||||
<span class='doccomment'>//! ```no_run</span>
|
||||
<span class='doccomment'>//! use clap::{Arg, App, SubCommand};</span>
|
||||
|
@ -311,7 +311,7 @@
|
|||
<span class='kw'>use</span> <span class='ident'>super</span>::<span class='op'>*</span>;
|
||||
|
||||
<span class='attribute'>#[<span class='ident'>test</span>]</span>
|
||||
<span class='attribute'>#[<span class='ident'>should_fail</span>]</span>
|
||||
<span class='attribute'>#[<span class='ident'>should_panic</span>]</span>
|
||||
<span class='kw'>fn</span> <span class='ident'>unique_arg_names</span>(){
|
||||
<span class='ident'>App</span>::<span class='ident'>new</span>(<span class='string'>"some"</span>).<span class='ident'>args</span>(<span class='macro'>vec</span><span class='macro'>!</span>[
|
||||
<span class='ident'>Arg</span>::<span class='ident'>new</span>(<span class='string'>"arg"</span>).<span class='ident'>short</span>(<span class='string'>"a"</span>),
|
||||
|
@ -319,7 +319,7 @@
|
|||
]);
|
||||
}
|
||||
<span class='attribute'>#[<span class='ident'>test</span>]</span>
|
||||
<span class='attribute'>#[<span class='ident'>should_fail</span>]</span>
|
||||
<span class='attribute'>#[<span class='ident'>should_panic</span>]</span>
|
||||
<span class='kw'>fn</span> <span class='ident'>unique_arg_shorts</span>(){
|
||||
<span class='ident'>App</span>::<span class='ident'>new</span>(<span class='string'>"some"</span>).<span class='ident'>args</span>(<span class='macro'>vec</span><span class='macro'>!</span>[
|
||||
<span class='ident'>Arg</span>::<span class='ident'>new</span>(<span class='string'>"arg1"</span>).<span class='ident'>short</span>(<span class='string'>"a"</span>),
|
||||
|
@ -327,7 +327,7 @@
|
|||
]);
|
||||
}
|
||||
<span class='attribute'>#[<span class='ident'>test</span>]</span>
|
||||
<span class='attribute'>#[<span class='ident'>should_fail</span>]</span>
|
||||
<span class='attribute'>#[<span class='ident'>should_panic</span>]</span>
|
||||
<span class='kw'>fn</span> <span class='ident'>unique_arg_longs</span>(){
|
||||
<span class='ident'>App</span>::<span class='ident'>new</span>(<span class='string'>"some"</span>).<span class='ident'>args</span>(<span class='macro'>vec</span><span class='macro'>!</span>[
|
||||
<span class='ident'>Arg</span>::<span class='ident'>new</span>(<span class='string'>"arg1"</span>).<span class='ident'>long</span>(<span class='string'>"long"</span>),
|
||||
|
|
Loading…
Reference in a new issue