1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//! Key-Value Store Module
//!
//! Provides a persistent key-value store with tagging and metadata support.
//!
//! # Features
//! - Simple key-value storage with persistence
//! - Tag-based queries
//! - Metadata filtering
//! - Key pattern matching
//! - Serialization utilities
//!
//! # Example
//!
//! ```ignore
//! use selfware::kv_store::{KvStore, Entry};
//!
//! // Create a new in-memory store
//! let mut store = KvStore::new();
//! store.insert("key1", "value1").unwrap();
//!
//! // Create a persistent store
//! let mut store = KvStore::with_path("data/store.json").unwrap();
//! store.upsert("key2", "value2").unwrap();
//!
//! // Query by tag
//! let entry = Entry::new("key3", "value3")
//! .with_tags(vec!["important".to_string()]);
//! store.upsert("key3", entry).unwrap();
//! let important = store.by_tag("important");
//!
//! // Serialize store
//! let store_data: HashMap<String, Entry> = store.entries()
//! .map(|e| (e.key.clone(), e.clone()))
//! .collect();
//! let json = store_data.serialize_to_json().unwrap();
//! ```
// Re-export the main types for convenience
pub use Entry;
pub use ;
pub use ;