Skip to main content

PredicateRunner

Trait PredicateRunner 

Source
pub trait PredicateRunner {
    // Required methods
    fn hash(&self) -> PredicateHash;
    fn kind(&self) -> PredicateKind;
    fn evaluate<'life0, 'async_trait>(
        &'life0 self,
        context: PredicateContext,
    ) -> Pin<Box<dyn Future<Output = InvariantResult> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided methods
    fn fallback_hash(&self) -> Option<PredicateHash> { ... }
    fn evidence(&self) -> BTreeMap<String, String> { ... }
}
Expand description

Predicate runner supplied by a collector or Harn adapter.

Required Methods§

Source

fn hash(&self) -> PredicateHash

Source

fn kind(&self) -> PredicateKind

Source

fn evaluate<'life0, 'async_trait>( &'life0 self, context: PredicateContext, ) -> Pin<Box<dyn Future<Output = InvariantResult> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Provided Methods§

Source

fn fallback_hash(&self) -> Option<PredicateHash>

Source

fn evidence(&self) -> BTreeMap<String, String>

Static evidence captured when the predicate was authored. Semantic predicates may only judge over this map; the executor never fetches evidence during evaluation.

Implementors§