diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-05-09 16:42:50 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-05-09 17:13:35 +0800 |
| commit | 10bc4ca7a4b3f14cfb57bf72a6da8aaa1490acf3 (patch) | |
| tree | 8b985dad38cfcd4c88af962b3e163131b258a381 /mingling_core/src/asset | |
| parent | 89b5132b8c17b6eba45b1bd49aa18b0c02016387 (diff) | |
Add lifecycle hooks to program execution
Diffstat (limited to 'mingling_core/src/asset')
| -rw-r--r-- | mingling_core/src/asset/dispatcher.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mingling_core/src/asset/dispatcher.rs b/mingling_core/src/asset/dispatcher.rs index cf8fcca..95b3305 100644 --- a/mingling_core/src/asset/dispatcher.rs +++ b/mingling_core/src/asset/dispatcher.rs @@ -1,6 +1,6 @@ use std::fmt::Display; -use crate::{ChainProcess, Program, asset::node::Node}; +use crate::{ChainProcess, Program, ProgramCollect, asset::node::Node}; /// Dispatches user input commands to specific [ChainProcess](./enum.ChainProcess.html) /// @@ -27,7 +27,10 @@ where } } -impl<C: crate::program::ProgramCollect> Program<C> { +impl<C> Program<C> +where + C: ProgramCollect<Enum = C>, +{ /// Adds a dispatcher to the program. #[cfg(not(feature = "dispatch_tree"))] pub fn with_dispatcher<Disp>(&mut self, dispatcher: Disp) |
