diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-08-03 13:36:13 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-08-03 13:36:13 +0800 |
| commit | 9c8f5c8d60f3066fec8a1573aa3f5673e0b2ecb8 (patch) | |
| tree | 99a5de6f698310215163ffd488de2354c4b7fb3e /mingling_core/src/program | |
| parent | 82372181d3b819ce57b04207f42406c188e42ac9 (diff) | |
chore!: rename ErrorDispatcherNotFound to EntryFallback
Rename the internal fallback type and its associated `ProgramCollect`
plumbing from `ErrorDispatcherNotFound`/`build_dispatcher_not_found` to
`EntryFallback`/`build_entry_fallback`, along with the generated enum
variant and pack type. Update all documentation, examples, and tests
accordingly.
Diffstat (limited to 'mingling_core/src/program')
| -rw-r--r-- | mingling_core/src/program/collection.rs | 4 | ||||
| -rw-r--r-- | mingling_core/src/program/collection/mock.rs | 4 | ||||
| -rw-r--r-- | mingling_core/src/program/exec.rs | 4 | ||||
| -rw-r--r-- | mingling_core/src/program/hook.rs | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/mingling_core/src/program/collection.rs b/mingling_core/src/program/collection.rs index fa062cf..1b4d7dd 100644 --- a/mingling_core/src/program/collection.rs +++ b/mingling_core/src/program/collection.rs @@ -22,7 +22,7 @@ pub trait ProgramCollect { /// Enum type representing internal IDs for the program type Enum; /// Error type when a dispatcher is not found for the given member - type ErrorDispatcherNotFound: Grouped<Self::Enum>; + type EntryFallback: Grouped<Self::Enum>; /// Error type when a renderer is not found for the given member type ErrorRendererNotFound: Grouped<Self::Enum>; @@ -55,7 +55,7 @@ pub trait ProgramCollect { fn build_renderer_not_found(member_id: Self::Enum) -> AnyOutput<Self::Enum>; /// Build an [`AnyOutput`](./struct.AnyOutput.html) to indicate that a dispatcher was not found - fn build_dispatcher_not_found(args: Vec<String>) -> AnyOutput<Self::Enum>; + fn build_entry_fallback(args: Vec<String>) -> AnyOutput<Self::Enum>; /// Build an [`AnyOutput`](./struct.AnyOutput.html) to indicate that the chain returned an empty result fn build_empty_result() -> AnyOutput<Self::Enum>; diff --git a/mingling_core/src/program/collection/mock.rs b/mingling_core/src/program/collection/mock.rs index dbe4789..cd2abf5 100644 --- a/mingling_core/src/program/collection/mock.rs +++ b/mingling_core/src/program/collection/mock.rs @@ -34,7 +34,7 @@ unsafe impl Grouped<MockProgramCollect> for MockProgramCollect { impl ProgramCollect for MockProgramCollect { type Enum = MockProgramCollect; - type ErrorDispatcherNotFound = MockProgramCollect; + type EntryFallback = MockProgramCollect; type ErrorRendererNotFound = MockProgramCollect; type ResultEmpty = MockProgramCollect; @@ -54,7 +54,7 @@ impl ProgramCollect for MockProgramCollect { unreachable!() } - fn build_dispatcher_not_found(_args: Vec<String>) -> AnyOutput<Self::Enum> { + fn build_entry_fallback(_args: Vec<String>) -> AnyOutput<Self::Enum> { unreachable!() } diff --git a/mingling_core/src/program/exec.rs b/mingling_core/src/program/exec.rs index f0322a5..d9b4dd8 100644 --- a/mingling_core/src/program/exec.rs +++ b/mingling_core/src/program/exec.rs @@ -45,7 +45,7 @@ where } // Current - let mut current = C::build_dispatcher_not_found(vec![]); + let mut current = C::build_entry_fallback(vec![]); // Run hooks control!( @@ -193,7 +193,7 @@ where } Err(ProgramInternalExecuteError::DispatcherNotFound) => { // No matching Dispatcher is found - C::build_dispatcher_not_found(args.to_vec()) + C::build_entry_fallback(args.to_vec()) } Err(e) => return Err(e), }; diff --git a/mingling_core/src/program/hook.rs b/mingling_core/src/program/hook.rs index 7d94a21..50c53d7 100644 --- a/mingling_core/src/program/hook.rs +++ b/mingling_core/src/program/hook.rs @@ -713,7 +713,7 @@ mod tests { impl ProgramCollect for MockHookEnum { type Enum = MockHookEnum; - type ErrorDispatcherNotFound = MockHookEnum; + type EntryFallback = MockHookEnum; type ErrorRendererNotFound = MockHookEnum; type ResultEmpty = MockHookEnum; @@ -721,7 +721,7 @@ mod tests { unreachable!() } - fn build_dispatcher_not_found(_args: Vec<String>) -> crate::AnyOutput<MockHookEnum> { + fn build_entry_fallback(_args: Vec<String>) -> crate::AnyOutput<MockHookEnum> { unreachable!() } |
