pub struct LfFilter {
pub info: PluginInfo,
pub ruleset: RuleSet,
pub entry: PathBuf,
}Expand description
Runs a .lf plugin in-process by executing the parsed lf::RuleSet.
Shell and Python escape hatches still spawn subprocesses, but built-in
ops (keep/drop/head/tail/else) run without forking.
Fields§
§info: PluginInfo§ruleset: RuleSet§entry: PathBufImplementations§
Source§impl LfFilter
impl LfFilter
pub fn load(info: PluginInfo, entry: PathBuf) -> Result<Self>
Sourcepub fn from_source(
info: PluginInfo,
source: &str,
entry: PathBuf,
) -> Result<Self>
pub fn from_source( info: PluginInfo, source: &str, entry: PathBuf, ) -> Result<Self>
Build from an in-memory .lf source — used by embedded plugins where
the source string lives in .rodata and never touches disk. entry
is a synthetic display-only path for error messages.
Trait Implementations§
Source§impl FilterPlugin for LfFilter
impl FilterPlugin for LfFilter
Source§fn info(&self) -> PluginInfo
fn info(&self) -> PluginInfo
Plugin metadata.
Source§fn filter(&self, input: &FilterInput) -> Result<FilterOutput>
fn filter(&self, input: &FilterInput) -> Result<FilterOutput>
Apply filter to command output.
Auto Trait Implementations§
impl Freeze for LfFilter
impl RefUnwindSafe for LfFilter
impl Send for LfFilter
impl Sync for LfFilter
impl Unpin for LfFilter
impl UnsafeUnpin for LfFilter
impl UnwindSafe for LfFilter
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