Struct conjure_oxide::Rule
source · pub struct Rule<'a> {
pub name: &'a str,
pub application: fn(_: &Expression, _: &Model) -> Result<Reduction, ApplicationError>,
pub rule_sets: &'a [(&'a str, u8)],
}
Expand description
A rule with a name, application function, and rule sets.
§Fields
name
The name of the rule.application
The function to apply the rule.rule_sets
A list of rule set names and priorities that this rule is a part of. This is used to populate rulesets at runtime.
Fields§
§name: &'a str
§application: fn(_: &Expression, _: &Model) -> Result<Reduction, ApplicationError>
§rule_sets: &'a [(&'a str, u8)]
Implementations§
Trait Implementations§
impl<'a> Eq for Rule<'a>
Auto Trait Implementations§
impl<'a> Freeze for Rule<'a>
impl<'a> RefUnwindSafe for Rule<'a>
impl<'a> Send for Rule<'a>
impl<'a> Sync for Rule<'a>
impl<'a> Unpin for Rule<'a>
impl<'a> UnwindSafe for Rule<'a>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)