}</code></pre><detailsclass="toggle top-doc"open><summaryclass="hideme"><span>Expand description</span></summary><divclass="docblock"><p>Parse a sub-command into a user-defined enum.</p>
<p>Implementing this trait lets a parent container delegate subcommand behavior to <code>Self</code>.
with:</p>
<ul>
<li><code>#[command(subcommand)] field: SubCmd</code>: Attribute can be used with either struct fields or enum
variants that impl <code>Subcommand</code>.</li>
<li><code>#[command(flatten)] Variant(SubCmd)</code>: Attribute can only be used with enum variants that impl
<code>Subcommand</code>.</li>
</ul>
<p><strong>NOTE:</strong> Deriving requires the <code>derive</code> feature flag</p>
</div></details><h2id="required-methods"class="section-header">Required Methods<ahref="#required-methods"class="anchor">§</a></h2><divclass="methods"><detailsclass="toggle method-toggle"open><summary><sectionid="tymethod.augment_subcommands"class="method"><aclass="src rightside"href="../src/clap_builder/derive.rs.html#245">source</a><h4class="code-header">fn <ahref="#tymethod.augment_subcommands"class="fn">augment_subcommands</a>(cmd: <aclass="struct"href="builder/struct.Command.html"title="struct clap_builder::builder::Command">Command</a>) -><aclass="struct"href="builder/struct.Command.html"title="struct clap_builder::builder::Command">Command</a></h4></section></summary><divclass="docblock"><p>Append to <ahref="builder/struct.Command.html"title="struct clap_builder::builder::Command"><code>Command</code></a> so it can instantiate <code>Self</code>.</p>
<p>See also <ahref="trait.CommandFactory.html"title="trait clap_builder::CommandFactory"><code>CommandFactory</code></a>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="tymethod.augment_subcommands_for_update"class="method"><aclass="src rightside"href="../src/clap_builder/derive.rs.html#251">source</a><h4class="code-header">fn <ahref="#tymethod.augment_subcommands_for_update"class="fn">augment_subcommands_for_update</a>(cmd: <aclass="struct"href="builder/struct.Command.html"title="struct clap_builder::builder::Command">Command</a>) -><aclass="struct"href="builder/struct.Command.html"title="struct clap_builder::builder::Command">Command</a></h4></section></summary><divclass="docblock"><p>Append to <ahref="builder/struct.Command.html"title="struct clap_builder::builder::Command"><code>Command</code></a> so it can update <code>self</code>.</p>
<p>This is used to implement <code>#[command(flatten)]</code></p>
<p>See also <ahref="trait.CommandFactory.html"title="trait clap_builder::CommandFactory"><code>CommandFactory</code></a>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="tymethod.has_subcommand"class="method"><aclass="src rightside"href="../src/clap_builder/derive.rs.html#253">source</a><h4class="code-header">fn <ahref="#tymethod.has_subcommand"class="fn">has_subcommand</a>(name: &<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>Test whether <code>Self</code> can parse a specific subcommand</p>