From b47bdc15fdb78ac5e78b2e04aca0190c84aa78f4 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Fri, 8 May 2026 15:49:07 +0800 Subject: Add error type aliases to ProgramCollect trait --- mingling_core/src/program.rs | 2 ++ mingling_macros/src/lib.rs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/mingling_core/src/program.rs b/mingling_core/src/program.rs index febb5db..c7544f5 100644 --- a/mingling_core/src/program.rs +++ b/mingling_core/src/program.rs @@ -294,6 +294,8 @@ where pub trait ProgramCollect { /// Enum type representing internal IDs for the program type Enum: Display; + type DispatcherNotFound: Groupped; + type RendererNotFound: Groupped; /// Use a prefix tree to quickly match arguments and dispatch to an Entry #[cfg(feature = "dispatch_tree")] diff --git a/mingling_macros/src/lib.rs b/mingling_macros/src/lib.rs index 2624f60..23f9ad9 100644 --- a/mingling_macros/src/lib.rs +++ b/mingling_macros/src/lib.rs @@ -1243,6 +1243,8 @@ pub fn program_final_gen(input: TokenStream) -> TokenStream { impl ::mingling::ProgramCollect for #name { type Enum = #name; + type DispatcherNotFound = DispatcherNotFound; + type RendererNotFound = RendererNotFound; fn build_renderer_not_found(member_id: Self::Enum) -> ::mingling::AnyOutput { ::mingling::AnyOutput::new(RendererNotFound::new(member_id.to_string())) } -- cgit