pub struct RuleModule {
pub name: String,
pub version: String,
pub description: String,
pub rules: Vec<Rule>,
pub dependencies: Vec<String>,
pub metadata: HashMap<String, String>,
pub namespace: String,
}Expand description
Rule module for organizing related rules
Fields§
§name: StringModule name/identifier
version: StringModule version
description: StringModule description
rules: Vec<Rule>Rules in this module
dependencies: Vec<String>Modules this module depends on
metadata: HashMap<String, String>Module metadata
namespace: StringModule namespace
Implementations§
Source§impl RuleModule
impl RuleModule
Sourcepub fn with_version(name: String, version: String) -> Self
pub fn with_version(name: String, version: String) -> Self
Create a module with specific version
Sourcepub fn add_dependency(&mut self, module_name: String)
pub fn add_dependency(&mut self, module_name: String)
Add a dependency
Sourcepub fn set_description(&mut self, description: String)
pub fn set_description(&mut self, description: String)
Set module description
Sourcepub fn set_namespace(&mut self, namespace: String)
pub fn set_namespace(&mut self, namespace: String)
Set namespace
Sourcepub fn remove_rule(&mut self, name: &str) -> Option<Rule>
pub fn remove_rule(&mut self, name: &str) -> Option<Rule>
Remove a rule by name
Sourcepub fn get_stats(&self) -> ModuleStats
pub fn get_stats(&self) -> ModuleStats
Get module statistics
Trait Implementations§
Source§impl Clone for RuleModule
impl Clone for RuleModule
Auto Trait Implementations§
impl Freeze for RuleModule
impl RefUnwindSafe for RuleModule
impl Send for RuleModule
impl Sync for RuleModule
impl Unpin for RuleModule
impl UnsafeUnpin for RuleModule
impl UnwindSafe for RuleModule
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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