diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-05-02 22:57:18 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-05-02 22:57:18 +0800 |
| commit | 12e7b65883a22030039806c41e704c27731e8dd9 (patch) | |
| tree | 5461f7cc5a7c69fcf2d4752833eb38b72e21fe4a /mingling_core/src/any.rs | |
| parent | 81be96847833bd443ddb157cedb7939d8ffcc150 (diff) | |
Add Display derive and testing utilities for Next enum
Diffstat (limited to 'mingling_core/src/any.rs')
| -rw-r--r-- | mingling_core/src/any.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mingling_core/src/any.rs b/mingling_core/src/any.rs index d1ab3d3..21611a7 100644 --- a/mingling_core/src/any.rs +++ b/mingling_core/src/any.rs @@ -117,11 +117,21 @@ pub enum ChainProcess<G> { /// /// - `Chain`: Continue execution to the next chain /// - `Renderer`: Send output to renderer and end execution +#[derive(Debug, PartialEq, Eq)] pub enum Next { Chain, Renderer, } +impl std::fmt::Display for Next { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Next::Chain => write!(f, "Chain"), + Next::Renderer => write!(f, "Renderer"), + } + } +} + impl<G> From<AnyOutput<G>> for ChainProcess<G> { fn from(value: AnyOutput<G>) -> Self { ChainProcess::Ok((value, Next::Chain)) |
