diff options
| author | Weicao-CatilGrass <1992414357@qq.com> | 2026-05-17 22:59:15 +0800 |
|---|---|---|
| committer | Weicao-CatilGrass <1992414357@qq.com> | 2026-05-17 22:59:15 +0800 |
| commit | 287d45e32b9bdeaaf58b70ebb9a27335f74c529d (patch) | |
| tree | 3d2b9f3625224380de12bf84c068ba8db384d85b /mingling_core/src | |
| parent | ab3f173115fce8cd769c6f513560da8a57bc8df6 (diff) | |
Add no-return-value mode for `#[chain]` macro
Diffstat (limited to 'mingling_core/src')
| -rw-r--r-- | mingling_core/src/program.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mingling_core/src/program.rs b/mingling_core/src/program.rs index a00b2c7..fbffb3d 100644 --- a/mingling_core/src/program.rs +++ b/mingling_core/src/program.rs @@ -401,6 +401,7 @@ pub trait ProgramCollect { type Enum; type DispatcherNotFound: Groupped<Self::Enum>; type RendererNotFound: Groupped<Self::Enum>; + type EmptyResult: Groupped<Self::Enum>; /// Use a prefix tree to quickly match arguments and dispatch to an Entry #[cfg(feature = "dispatch_tree")] @@ -418,6 +419,9 @@ pub trait ProgramCollect { /// Build an [AnyOutput](./struct.AnyOutput.html) to indicate that a dispatcher was not found fn build_dispatcher_not_found(args: Vec<String>) -> AnyOutput<Self::Enum>; + /// Build an [AnyOutput](./struct.AnyOutput.html) to indicate that the chain returned an empty result + fn build_empty_result() -> AnyOutput<Self::Enum>; + /// Render the input [AnyOutput](./struct.AnyOutput.html) fn render(any: AnyOutput<Self::Enum>, r: &mut RenderResult); |
