aboutsummaryrefslogtreecommitdiff
path: root/mingling_core/src/program/exec
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-04-01 15:48:41 +0800
committer魏曹先生 <1992414357@qq.com>2026-04-01 15:48:41 +0800
commit3de10ca22cca06c4d9069984d0e66e370a331dde (patch)
tree7e8a9b035c360c016cde848b3442d3e1d5dcac5e /mingling_core/src/program/exec
parentf3d6f76dfd07c35dabc11aa86d86c3671cd283c5 (diff)
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
Diffstat (limited to 'mingling_core/src/program/exec')
-rw-r--r--mingling_core/src/program/exec/error.rs12
1 files changed, 9 insertions, 3 deletions
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<ProgramInternalExecuteError> 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<ChainProcessError> for ProgramInternalExecuteError {
match value {
ChainProcessError::Other(s) => ProgramInternalExecuteError::Other(s),
ChainProcessError::IO(error) => ProgramInternalExecuteError::IO(error),
- ChainProcessError::Broken(_) => {
- ProgramInternalExecuteError::Other("Broken".to_string())
- }
}
}
}