pub trait KnowledgeBaseInterface: KnowledgeBase {
    // Required methods
    fn insert(
        &self,
        collection: impl Into<String>,
        key: impl Into<String>,
        data: &impl Serialize,
    ) -> Result<()>;
    fn retrieve<T: DeserializeOwned>(
        &self,
        collection: impl Into<String>,
        key: impl Into<String>,
    ) -> Result<T>;
}
Expand description

High level interface to the knowledge base

Required Methods§

source

fn insert( &self, collection: impl Into<String>, key: impl Into<String>, data: &impl Serialize, ) -> Result<()>

Insert a serializable object

source

fn retrieve<T: DeserializeOwned>( &self, collection: impl Into<String>, key: impl Into<String>, ) -> Result<T>

Retrieve and deserialize object

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<TKnowledgeBase: ?Sized + KnowledgeBase> KnowledgeBaseInterface for TKnowledgeBase