pub struct VerificationRule { /* private fields */ }Expand description
Declarative evidence expression mapped to one non-unknown outcome.
Implementations§
Source§impl VerificationRule
impl VerificationRule
Sourcepub fn new(
id: impl Into<String>,
stage: VerificationStage,
priority: u16,
condition: Expression,
outcome: OutcomeStatus,
confidence: Probability,
rationale: impl Into<String>,
) -> Result<Self, VerificationError>
pub fn new( id: impl Into<String>, stage: VerificationStage, priority: u16, condition: Expression, outcome: OutcomeStatus, confidence: Probability, rationale: impl Into<String>, ) -> Result<Self, VerificationError>
Creates a validated verifier rule.
Sourcepub fn scoped_to_action(
self,
action_id: impl Into<String>,
) -> Result<Self, VerificationError>
pub fn scoped_to_action( self, action_id: impl Into<String>, ) -> Result<Self, VerificationError>
Restricts this rule to verification cases opened by one action.
Restricts raw evidence evaluation to the current case correlation ID.
Case correlation is valid only for evidence-layer expressions. Facts, hypotheses, and ontology claims are not produced by one executor case.
Sourcepub fn stage(&self) -> VerificationStage
pub fn stage(&self) -> VerificationStage
Returns the evidence collection stage owned by this rule.
Sourcepub fn condition(&self) -> &Expression
pub fn condition(&self) -> &Expression
Returns the evidence expression.
Sourcepub fn outcome(&self) -> OutcomeStatus
pub fn outcome(&self) -> OutcomeStatus
Returns the classification emitted when the expression wins.
Sourcepub fn confidence(&self) -> Probability
pub fn confidence(&self) -> Probability
Returns the calibrated confidence assigned to this rule.
Sourcepub fn action_id(&self) -> Option<&str>
pub fn action_id(&self) -> Option<&str>
Returns the action identity required by this rule, if scoped.
Returns whether raw evidence is limited to the current case correlation.
Trait Implementations§
Source§impl Clone for VerificationRule
impl Clone for VerificationRule
Source§fn clone(&self) -> VerificationRule
fn clone(&self) -> VerificationRule
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 VerificationRule
impl Debug for VerificationRule
Source§impl<'de> Deserialize<'de> for VerificationRule
impl<'de> Deserialize<'de> for VerificationRule
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 VerificationRule
Source§impl PartialEq for VerificationRule
impl PartialEq for VerificationRule
Source§impl Serialize for VerificationRule
impl Serialize for VerificationRule
impl StructuralPartialEq for VerificationRule
Auto Trait Implementations§
impl Freeze for VerificationRule
impl RefUnwindSafe for VerificationRule
impl Send for VerificationRule
impl Sync for VerificationRule
impl Unpin for VerificationRule
impl UnsafeUnpin for VerificationRule
impl UnwindSafe for VerificationRule
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