pub struct EvidenceSelector { /* private fields */ }Expand description
Selects raw evidence for one Bayesian calibration.
The wire contract requires an explicit nullable value field. Canonical
constrained selectors also carry a compatibility guard, so losing one text
matcher cannot silently reconstruct the selector as predicate existence.
Guardless constrained selectors emitted by earlier Venom releases remain
readable and are canonicalized when serialized again.
Implementations§
Source§impl EvidenceSelector
impl EvidenceSelector
Sourcepub fn equals(predicate: KnowledgePredicate, value: EvidenceValue) -> Self
pub fn equals(predicate: KnowledgePredicate, value: EvidenceValue) -> Self
Selects evidence with an exact predicate and value.
Sourcepub fn exists(predicate: KnowledgePredicate) -> Self
pub fn exists(predicate: KnowledgePredicate) -> Self
Selects any evidence with this predicate.
Sourcepub fn text_contains_ascii_case_insensitive(
predicate: KnowledgePredicate,
needle: impl Into<String>,
) -> Result<Self, RuleEngineError>
pub fn text_contains_ascii_case_insensitive( predicate: KnowledgePredicate, needle: impl Into<String>, ) -> Result<Self, RuleEngineError>
Selects text evidence containing a locale-independent protocol token.
Sourcepub fn text_list_contains_exact(
predicate: KnowledgePredicate,
value: impl Into<String>,
) -> Result<Self, RuleEngineError>
pub fn text_list_contains_exact( predicate: KnowledgePredicate, value: impl Into<String>, ) -> Result<Self, RuleEngineError>
Selects evidence whose EvidenceValue::TextList contains an exact
element. This is the calibration companion to
Expression::text_list_contains_exact: it attributes the likelihood
only to a record carrying the exact element, never a substring match and
never a scalar text value — so convention provenance stays truthful.
Sourcepub fn predicate(&self) -> &KnowledgePredicate
pub fn predicate(&self) -> &KnowledgePredicate
Returns the selected predicate.
Sourcepub fn value(&self) -> Option<&EvidenceValue>
pub fn value(&self) -> Option<&EvidenceValue>
Returns an optional exact-value constraint.
Sourcepub fn text_needle(&self) -> Option<&str>
pub fn text_needle(&self) -> Option<&str>
Returns the optional ASCII case-insensitive text constraint.
Sourcepub fn text_list_exact_value(&self) -> Option<&str>
pub fn text_list_exact_value(&self) -> Option<&str>
Returns the optional exact text-list membership constraint.
Trait Implementations§
Source§impl Clone for EvidenceSelector
impl Clone for EvidenceSelector
Source§fn clone(&self) -> EvidenceSelector
fn clone(&self) -> EvidenceSelector
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EvidenceSelector
impl Debug for EvidenceSelector
Source§impl<'de> Deserialize<'de> for EvidenceSelector
impl<'de> Deserialize<'de> for EvidenceSelector
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>,
impl Eq for EvidenceSelector
Source§impl PartialEq for EvidenceSelector
impl PartialEq for EvidenceSelector
Source§impl Serialize for EvidenceSelector
impl Serialize for EvidenceSelector
impl StructuralPartialEq for EvidenceSelector
Auto Trait Implementations§
impl Freeze for EvidenceSelector
impl RefUnwindSafe for EvidenceSelector
impl Send for EvidenceSelector
impl Sync for EvidenceSelector
impl Unpin for EvidenceSelector
impl UnsafeUnpin for EvidenceSelector
impl UnwindSafe for EvidenceSelector
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
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
§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
key and return true if they are equal.