godchat-core 0.1.0

Core types and traits for godchat
Documentation
use crate::ports::InsightStore;
use crate::types::*;

pub struct StubInsightStore;

impl StubInsightStore {
    pub fn new() -> Self {
        Self
    }
}

impl InsightStore for StubInsightStore {
    fn add(&self, content: &str, _links: &[InsightLink]) -> Insight {
        Insight {
            id: 0,
            content: content.to_owned(),
            links: vec![],
        }
    }

    fn search(&self, _query: &str) -> Vec<Insight> {
        vec![]
    }

    fn related(&self, _target: &InsightLink) -> Vec<Insight> {
        vec![]
    }
}