From 3de10ca22cca06c4d9069984d0e66e370a331dde Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Wed, 1 Apr 2026 15:48:41 +0800 Subject: Replace typeid-based dispatch with enum-based dispatch - Add `Groupped` trait and `member_id` to `AnyOutput` - Add generic parameter `G` to `Dispatcher`, `Chain`, `Program` etc - Remove `hint` module and its marker types - Update macros to support explicit group specification - Add `gen_program` macro for generating enum-based programs - Add `GroupProcess` marker type for type-level grouping --- mingling_core/src/program/exec/error.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'mingling_core/src/program/exec') diff --git a/mingling_core/src/program/exec/error.rs b/mingling_core/src/program/exec/error.rs index fe66e22..b4ff378 100644 --- a/mingling_core/src/program/exec/error.rs +++ b/mingling_core/src/program/exec/error.rs @@ -5,6 +5,9 @@ pub enum ProgramExecuteError { #[error("No Dispatcher Found")] DispatcherNotFound, + #[error("No Renderer (`{0}`) Found")] + RendererNotFound(String), + #[error("Other error: {0}")] Other(String), } @@ -14,6 +17,9 @@ pub enum ProgramInternalExecuteError { #[error("No Dispatcher Found")] DispatcherNotFound, + #[error("No Renderer (`{0}`) Found")] + RendererNotFound(String), + #[error("Other error: {0}")] Other(String), @@ -27,6 +33,9 @@ impl From for ProgramExecuteError { ProgramInternalExecuteError::DispatcherNotFound => { ProgramExecuteError::DispatcherNotFound } + ProgramInternalExecuteError::RendererNotFound(s) => { + ProgramExecuteError::RendererNotFound(s) + } ProgramInternalExecuteError::Other(s) => ProgramExecuteError::Other(s), ProgramInternalExecuteError::IO(e) => ProgramExecuteError::Other(format!("{}", e)), } @@ -38,9 +47,6 @@ impl From for ProgramInternalExecuteError { match value { ChainProcessError::Other(s) => ProgramInternalExecuteError::Other(s), ChainProcessError::IO(error) => ProgramInternalExecuteError::IO(error), - ChainProcessError::Broken(_) => { - ProgramInternalExecuteError::Other("Broken".to_string()) - } } } } -- cgit