Skip to main content

TokenStore

Trait TokenStore 

Source
pub trait TokenStore<B: Postings> {
    // Required methods
    fn atom(&self, pattern: &str) -> B;
    fn universe(&self) -> B;

    // Provided methods
    fn numeric(&self, _field: &str, _op: &str, _value: f64) -> B { ... }
    fn evidence(&self, token: &str, _min_bel: f64) -> B { ... }
    fn s_path(&self, _a: &str, _b: &str, _s: usize) -> Option<B> { ... }
}

Required Methods§

Source

fn atom(&self, pattern: &str) -> B

Source

fn universe(&self) -> B

Provided Methods§

Source

fn numeric(&self, _field: &str, _op: &str, _value: f64) -> B

Situations whose numeric field satisfies field op value (op ∈ ge|gt|le|lt|eq|ne). Stores without a numeric layer return empty.

Source

fn evidence(&self, token: &str, _min_bel: f64) -> B

Situations where token holds with per-situation belief ≥ min_bel (paper §6, the evidence atom). Stores without a polarity layer fall back to plain membership.

Source

fn s_path(&self, _a: &str, _b: &str, _s: usize) -> Option<B>

Situations lying on an s-path between two tokens: a chain where consecutive steps share at least s situations (paper §3.3). Stores without a topological layer return nothing.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§