mirror of
https://github.com/clap-rs/clap
synced 2024-12-14 14:52:33 +00:00
wip: clap_derive docs
This commit is contained in:
parent
c76f526773
commit
609202e2a0
1 changed files with 6 additions and 1 deletions
|
@ -36,7 +36,12 @@ pub fn arg_enum(input: TokenStream) -> TokenStream {
|
|||
derives::derive_arg_enum(&input).into()
|
||||
}
|
||||
|
||||
/// Generates the `Clap` impl.
|
||||
/// Generates the `Clap` implementation.
|
||||
///
|
||||
/// This is far less verbose than defining the [`App`] struct manually,
|
||||
/// receiving an instance of [`ArgMatches`] from conducting parsing, and then
|
||||
/// implementing a conversion code (usually `impl From<ArgMatches> for
|
||||
/// MyStruct`) to instantiate an instance of the user context struct.
|
||||
#[proc_macro_derive(Clap, attributes(clap))]
|
||||
#[proc_macro_error]
|
||||
pub fn clap(input: TokenStream) -> TokenStream {
|
||||
|
|
Loading…
Reference in a new issue