diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-04-10 16:47:40 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-04-10 16:47:40 +0800 |
| commit | b18749170b6006e53976dbb6df9f59a3b9c34127 (patch) | |
| tree | a0f9288fdc9082e26daab218167da1f54521d32b /mingling_core/src/program.rs | |
| parent | 3bb5afcbe01ad16293a66084dc1ad35f3378a833 (diff) | |
Add completion macro infrastructure without logic
Diffstat (limited to 'mingling_core/src/program.rs')
| -rw-r--r-- | mingling_core/src/program.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mingling_core/src/program.rs b/mingling_core/src/program.rs index 8c8b4cb..7b9f8d4 100644 --- a/mingling_core/src/program.rs +++ b/mingling_core/src/program.rs @@ -1,5 +1,9 @@ +#[cfg(feature = "comp")] +use crate::{ShellContext, Suggest}; + #[cfg(feature = "general_renderer")] use crate::error::GeneralRendererSerializeError; + use crate::{ AnyOutput, ChainProcess, RenderResult, asset::dispatcher::Dispatcher, error::ProgramExecuteError, @@ -183,6 +187,10 @@ pub trait ProgramCollect { any: AnyOutput<Self::Enum>, ) -> Pin<Box<dyn Future<Output = ChainProcess<Self::Enum>> + Send>>; + /// Match and execute specific completion logic based on any Entry + #[cfg(feature = "comp")] + fn do_comp(any: &AnyOutput<Self::Enum>, ctx: &ShellContext) -> Suggest; + /// Whether the program has a renderer that can handle the current [AnyOutput](./struct.AnyOutput.html) fn has_renderer(any: &AnyOutput<Self::Enum>) -> bool; |
