From 609202e2a0f8b01fa6849824f0c0f19d20e6ae10 Mon Sep 17 00:00:00 2001 From: Kevin K Date: Tue, 28 Apr 2020 22:29:49 -0400 Subject: [PATCH] wip: clap_derive docs --- clap_derive/src/lib.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/clap_derive/src/lib.rs b/clap_derive/src/lib.rs index 3e13d10e..468846fc 100644 --- a/clap_derive/src/lib.rs +++ b/clap_derive/src/lib.rs @@ -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 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 {