diff options
Diffstat (limited to 'mingling_macros/src/dispatcher_clap.rs')
| -rw-r--r-- | mingling_macros/src/dispatcher_clap.rs | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/mingling_macros/src/dispatcher_clap.rs b/mingling_macros/src/dispatcher_clap.rs index 06f2c5a..37c662f 100644 --- a/mingling_macros/src/dispatcher_clap.rs +++ b/mingling_macros/src/dispatcher_clap.rs @@ -1,42 +1,3 @@ -//! Dispatcher Clap Attribute Macro -//! -//! This module provides the `#[dispatcher_clap(...)]` attribute macro for -//! automatically generating a `Dispatcher` implementation that uses `clap::Parser` -//! to parse command arguments into the annotated struct. -//! -//! This macro is only available when the `clap` feature is enabled. -//! -//! # Syntax -//! -//! ```rust,ignore -//! #[derive(Groupped, clap::Parser)] -//! #[dispatcher_clap("command_name", DispatcherName)] -//! struct MyEntry { -//! #[arg(long, short)] -//! name: String, -//! } -//! ``` -//! -//! Or with explicit program name: -//! -//! ```rust,ignore -//! #[dispatcher_clap(MyProgram, "ok", CommandOk, error = CommandParseError)] -//! struct OkEntry { -//! #[arg(long, short)] -//! str: String, -//! } -//! ``` -//! -//! Or with help: -//! -//! ```rust,ignore -//! #[dispatcher_clap("ok", CommandOk, error = CommandParseError, help = true)] -//! struct OkEntry { -//! #[arg(long, short)] -//! str: String, -//! } -//! ``` - use proc_macro::TokenStream; use quote::quote; use syn::{ |
