pub struct SkillPreprocessor {
pub enable_commands: bool,
pub command_timeout: u64,
pub enable_env_vars: bool,
}Expand description
Preprocessor for skill content.
Fields§
§enable_commands: boolEnable shell command execution.
command_timeout: u64Timeout for shell commands (seconds).
enable_env_vars: boolEnable environment variable substitution.
Implementations§
Source§impl SkillPreprocessor
impl SkillPreprocessor
Sourcepub fn preprocess(
&self,
content: &str,
arguments: &str,
context: &HashMap<String, Value>,
) -> Result<String>
pub fn preprocess( &self, content: &str, arguments: &str, context: &HashMap<String, Value>, ) -> Result<String>
Preprocess skill content with arguments and commands.
Processing order:
$ARGUMENTSsubstitution!command`` execution (if enabled){{variable}}context substitution${ENV_VAR}environment substitution (if enabled)
Trait Implementations§
Source§impl Clone for SkillPreprocessor
impl Clone for SkillPreprocessor
Source§fn clone(&self) -> SkillPreprocessor
fn clone(&self) -> SkillPreprocessor
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SkillPreprocessor
impl Debug for SkillPreprocessor
Auto Trait Implementations§
impl Freeze for SkillPreprocessor
impl RefUnwindSafe for SkillPreprocessor
impl Send for SkillPreprocessor
impl Sync for SkillPreprocessor
impl Unpin for SkillPreprocessor
impl UnsafeUnpin for SkillPreprocessor
impl UnwindSafe for SkillPreprocessor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more