aboutsummaryrefslogtreecommitdiff
path: root/mingling/src/gen_program.rs
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-08-17 05:49:19 +0800
committer魏曹先生 <1992414357@qq.com>2026-08-17 05:49:19 +0800
commit57c53affe3542cb6bd4e79ee4c18f20a1bd76b2d (patch)
tree1cd4aef44cb7a45a8cd9d520b598f5f181e24c76 /mingling/src/gen_program.rs
parentef23cd944402939605c78a4a853ef6e33af02c21 (diff)
refactor!: replace pack! macros with derive-based pipeline types
Remove the `pack!`, `pack_err!`, `pack_structural!`, and `pack_err_structural!` macros, replacing all pipeline type definitions with `#[derive(Grouped)]` and `#[derive(Grouped, Wrap)]` attributes. This changes the generated struct shape from named-field structs with an `inner` field to tuple structs accessed via `.0`, and removes the auto-generated `name` and `info` fields from error types.
Diffstat (limited to 'mingling/src/gen_program.rs')
-rw-r--r--mingling/src/gen_program.rs12
1 files changed, 5 insertions, 7 deletions
diff --git a/mingling/src/gen_program.rs b/mingling/src/gen_program.rs
index 2c476a2..ed60668 100644
--- a/mingling/src/gen_program.rs
+++ b/mingling/src/gen_program.rs
@@ -12,7 +12,7 @@ pub type Next = ChainProcess<ThisProgram>;
/// The generic program entry point.
///
-/// This type is created by the `pack!` macro as a variant of the
+/// This type is generated by the `gen_program!` macro as a variant of the
/// program's output type set (`ThisProgram`).
pub struct Entry {
/// The arguments provided by the user
@@ -41,7 +41,7 @@ pub enum ThisProgram {
/// A struct representing a "renderer not found" error.
///
-/// This type is created by the `pack!` macro as a variant of the
+/// This type is generated by the `gen_program!` macro as a variant of the
/// program's output type set (`ThisProgram`).
pub struct ErrorRendererNotFound {
/// The name of the renderer that was not found
@@ -50,7 +50,7 @@ pub struct ErrorRendererNotFound {
/// A struct representing a "dispatcher not found" error.
///
-/// This type is created by the `pack!` macro as a variant of the
+/// This type is generated by the `gen_program!` macro as a variant of the
/// program's output type set (`ThisProgram`).
pub struct EntryFallback {
/// The arguments provided by the user
@@ -61,8 +61,6 @@ pub struct EntryFallback {
pub struct ResultEmpty;
/// A dispatcher representing the subcommand `__comp` itself.
-///
-/// **You can register it using `with_dispatcher`.**
#[cfg(feature = "comp")]
pub struct CMDCompletion;
@@ -71,7 +69,7 @@ pub struct CMDCompletion;
/// This struct holds the raw command-line arguments that were passed to the `__comp`
/// subcommand, which will be used to compute completion suggestions.
///
-/// This type is created by the `pack!` macro as a variant of the
+/// This type is generated by the `gen_program!` macro as a variant of the
/// program's output type set (`ThisProgram`).
#[cfg(feature = "comp")]
pub struct CompletionContext {
@@ -85,7 +83,7 @@ pub struct CompletionContext {
/// which together provide the information needed to render completion candidates
/// to the user's shell.
///
-/// This type is created by the `pack!` macro as a variant of the
+/// This type is generated by the `gen_program!` macro as a variant of the
/// program's output type set (`ThisProgram`).
#[cfg(feature = "comp")]
pub struct CompletionSuggest {