From 287d45e32b9bdeaaf58b70ebb9a27335f74c529d Mon Sep 17 00:00:00 2001 From: Weicao-CatilGrass <1992414357@qq.com> Date: Sun, 17 May 2026 22:59:15 +0800 Subject: Add no-return-value mode for `#[chain]` macro --- mingling_core/src/program.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mingling_core/src') 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; type RendererNotFound: Groupped; + type EmptyResult: Groupped; /// 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) -> AnyOutput; + /// Build an [AnyOutput](./struct.AnyOutput.html) to indicate that the chain returned an empty result + fn build_empty_result() -> AnyOutput; + /// Render the input [AnyOutput](./struct.AnyOutput.html) fn render(any: AnyOutput, r: &mut RenderResult); -- cgit