Skip to main content

FactStore

Trait FactStore 

Source
pub trait FactStore<'a>: ReadOnlyFactStore<'a> {
    // Required methods
    fn add<'src>(
        &'a self,
        src: &'src Arena,
        fact: &'src Atom<'src>,
    ) -> Result<bool>;
    fn merge<'src, S>(&'a self, src: &'src Arena, store: &'src S)
       where S: ReadOnlyFactStore<'src>;
}
Expand description

A fact store that can be mutated. Implementations must make use of interior mutability.

Required Methods§

Source

fn add<'src>(&'a self, src: &'src Arena, fact: &'src Atom<'src>) -> Result<bool>

Returns true if fact did not exist before. The fact is copied.

Source

fn merge<'src, S>(&'a self, src: &'src Arena, store: &'src S)
where S: ReadOnlyFactStore<'src>,

Adds all facts from given store.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl<'a> FactStore<'a> for TableStoreImpl<'a>