1use crate::traits::{Memory, MemoryCategory, MemoryEntry};
2use async_trait::async_trait;
3
4#[derive(Default)]
5pub struct NoneMemory;
6
7impl NoneMemory {
8 pub fn new() -> Self {
9 Self
10 }
11}
12
13#[async_trait]
14impl Memory for NoneMemory {
15 fn name(&self) -> &str {
16 "none"
17 }
18
19 async fn store(
20 &self,
21 _key: &str,
22 _content: &str,
23 _category: MemoryCategory,
24 _session_id: Option<&str>,
25 ) -> anyhow::Result<()> {
26 Ok(())
27 }
28
29 async fn recall(
30 &self,
31 _query: &str,
32 _limit: usize,
33 _session_id: Option<&str>,
34 ) -> anyhow::Result<Vec<MemoryEntry>> {
35 Ok(vec![])
36 }
37
38 async fn get(&self, _key: &str) -> anyhow::Result<Option<MemoryEntry>> {
39 Ok(None)
40 }
41
42 async fn list(
43 &self,
44 _category: Option<&MemoryCategory>,
45 _session_id: Option<&str>,
46 ) -> anyhow::Result<Vec<MemoryEntry>> {
47 Ok(vec![])
48 }
49
50 async fn forget(&self, _key: &str) -> anyhow::Result<bool> {
51 Ok(false)
52 }
53
54 async fn count(&self) -> anyhow::Result<usize> {
55 Ok(0)
56 }
57
58 async fn health_check(&self) -> bool {
59 true
60 }
61}