aboutsummaryrefslogtreecommitdiff
path: root/mingling_core
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-07-20 04:57:57 +0800
committer魏曹先生 <1992414357@qq.com>2026-07-20 04:57:57 +0800
commit34c4c66c1d336469e71fad8cff4828cf5d2bdafb (patch)
tree056dd2aef3b775f0d505353a50eefe9e72b7d84d /mingling_core
parent8526d32f5713caee52a4839701fe4c4e499fc646 (diff)
feat(core)!: remove `to_chain` and `to_render` from `Grouped` trait
Move routing methods exclusively to the `Routable` trait and update all macro-generated code to reference `Routable` instead of `Grouped`
Diffstat (limited to 'mingling_core')
-rw-r--r--mingling_core/src/any/group.rs24
1 files changed, 2 insertions, 22 deletions
diff --git a/mingling_core/src/any/group.rs b/mingling_core/src/any/group.rs
index 90ef9fc..2813ad5 100644
--- a/mingling_core/src/any/group.rs
+++ b/mingling_core/src/any/group.rs
@@ -11,26 +11,6 @@ where
{
/// Returns the specific enum value representing its ID within that enum
fn member_id() -> Group;
-
- /// Converts the grouped item into a `ChainProcess` directed to the chain route.
- ///
- /// This wraps the item into an `AnyOutput` and routes it to the chain processing pipeline.
- fn to_chain(self) -> ChainProcess<Group>
- where
- Self: Send,
- {
- AnyOutput::new(self).route_chain()
- }
-
- /// Converts the grouped item into a `ChainProcess` directed to the render route.
- ///
- /// This wraps the item into an `AnyOutput` and routes it to the render processing pipeline.
- fn to_render(self) -> ChainProcess<Group>
- where
- Self: Send,
- {
- AnyOutput::new(self).route_renderer()
- }
}
impl<T, C> Routable<C> for T
@@ -39,10 +19,10 @@ where
T: Grouped<C> + Send,
{
fn to_chain(self) -> ChainProcess<C> {
- T::to_chain(self)
+ AnyOutput::new(self).route_chain()
}
fn to_render(self) -> ChainProcess<C> {
- T::to_render(self)
+ AnyOutput::new(self).route_renderer()
}
}