pub struct ReasoningRule { /* private fields */ }Expand description
Stable declarative rule from an expression to a Bayesian conclusion.
Implementations§
Source§impl ReasoningRule
impl ReasoningRule
Sourcepub fn new(
id: impl Into<String>,
condition: Expression,
conclusion: HypothesisConclusion,
) -> Result<Self, RuleEngineError>
pub fn new( id: impl Into<String>, condition: Expression, conclusion: HypothesisConclusion, ) -> Result<Self, RuleEngineError>
Creates a rule with a stable, non-empty identity.
Sourcepub fn condition(&self) -> &Expression
pub fn condition(&self) -> &Expression
Returns the declarative condition.
Sourcepub fn conclusion(&self) -> &HypothesisConclusion
pub fn conclusion(&self) -> &HypothesisConclusion
Returns the Bayesian conclusion template.
Trait Implementations§
Source§impl Clone for ReasoningRule
impl Clone for ReasoningRule
Source§fn clone(&self) -> ReasoningRule
fn clone(&self) -> ReasoningRule
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ReasoningRule
impl Debug for ReasoningRule
Source§impl<'de> Deserialize<'de> for ReasoningRule
impl<'de> Deserialize<'de> for ReasoningRule
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ReasoningRule
Source§impl PartialEq for ReasoningRule
impl PartialEq for ReasoningRule
Source§impl Serialize for ReasoningRule
impl Serialize for ReasoningRule
impl StructuralPartialEq for ReasoningRule
Auto Trait Implementations§
impl Freeze for ReasoningRule
impl RefUnwindSafe for ReasoningRule
impl Send for ReasoningRule
impl Sync for ReasoningRule
impl Unpin for ReasoningRule
impl UnsafeUnpin for ReasoningRule
impl UnwindSafe for ReasoningRule
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more