Skip to content

armgit / xerj

Public Imported from GitHub
0

AI search engine and MCP server for bots and agents. One Rust binary indexes code, docs, logs, JSONL/CSV and PDFs for BM25 full-text, vector and hybrid search, code search without grep, agent memory and RAG. Elasticsearch-compatible API; Corpus Hub serves hundreds of reference memory corpora.

534 B
Raw Blame
/// In-memory storage used only by the synthetic map report fixture.
pub struct ParcelStore {
    capacity: usize,
    ids: Vec<String>,
}

impl ParcelStore {
    pub fn new(capacity: usize) -> Self {
        Self { capacity, ids: Vec::new() }
    }

    /// Return false when validation fails or the configured capacity is full.
    pub fn insert(&mut self, id: String) -> bool {
        if id.trim().is_empty() || self.ids.len() >= self.capacity {
            return false;
        }
        self.ids.push(id);
        true
    }
}