From b18749170b6006e53976dbb6df9f59a3b9c34127 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Fri, 10 Apr 2026 16:47:40 +0800 Subject: Add completion macro infrastructure without logic --- mingling_core/src/program.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'mingling_core/src/program.rs') 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, ) -> Pin> + Send>>; + /// Match and execute specific completion logic based on any Entry + #[cfg(feature = "comp")] + fn do_comp(any: &AnyOutput, ctx: &ShellContext) -> Suggest; + /// Whether the program has a renderer that can handle the current [AnyOutput](./struct.AnyOutput.html) fn has_renderer(any: &AnyOutput) -> bool; -- cgit