pub struct PluginLoader;Expand description
Discovers and loads YAML rule plugins from multiple directories.
Implementations§
Source§impl PluginLoader
impl PluginLoader
Sourcepub fn load_file(path: &Path) -> Result<Vec<YamlRule>, YamlRuleError>
pub fn load_file(path: &Path) -> Result<Vec<YamlRule>, YamlRuleError>
Load rules from a single YAML file.
Sourcepub fn load_directory(dir: &Path) -> RulePlugin
pub fn load_directory(dir: &Path) -> RulePlugin
Load all .yaml and .yml files from a directory.
Sourcepub fn discover(project_root: &Path) -> Vec<RulePlugin>
pub fn discover(project_root: &Path) -> Vec<RulePlugin>
Discover and load rules from all standard locations:
~/.kardo/plugins/(global)<project>/.kardo/rules/(project-local)
Sourcepub fn load_package(package_dir: &Path) -> RulePlugin
pub fn load_package(package_dir: &Path) -> RulePlugin
Load rules from a standard package directory (e.g., shipped rule packs).
Auto Trait Implementations§
impl Freeze for PluginLoader
impl RefUnwindSafe for PluginLoader
impl Send for PluginLoader
impl Sync for PluginLoader
impl Unpin for PluginLoader
impl UnsafeUnpin for PluginLoader
impl UnwindSafe for PluginLoader
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more