pub struct RuleEngine { /* private fields */ }Expand description
Rule engine that runs multiple rules
Implementations§
Source§impl RuleEngine
impl RuleEngine
Sourcepub fn extend_rules(
&mut self,
rules: impl IntoIterator<Item = Arc<dyn Rule>>,
) -> &mut Self
pub fn extend_rules( &mut self, rules: impl IntoIterator<Item = Arc<dyn Rule>>, ) -> &mut Self
Add multiple rules
Sourcepub fn validate(&self, input: &str) -> Result<ValidationResult>
pub fn validate(&self, input: &str) -> Result<ValidationResult>
Run all rules on input
Sourcepub fn rule_count(&self) -> usize
pub fn rule_count(&self) -> usize
Count rules
Trait Implementations§
Source§impl Clone for RuleEngine
impl Clone for RuleEngine
Source§fn clone(&self) -> RuleEngine
fn clone(&self) -> RuleEngine
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 moreAuto Trait Implementations§
impl Freeze for RuleEngine
impl !RefUnwindSafe for RuleEngine
impl Send for RuleEngine
impl Sync for RuleEngine
impl Unpin for RuleEngine
impl UnsafeUnpin for RuleEngine
impl !UnwindSafe for RuleEngine
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