pub struct WaveMemoryManager { /* private fields */ }Expand description
The unified Wave Memory Manager
This is THE memory system for Claude Code - combining:
- Wave-based semantic storage (fast, meaningful)
- Keyword indexing (instant lookup)
- Resonance search (find similar memories)
- Emotional context (valence + arousal)
- Temporal decay (old memories fade)
Implementations§
Source§impl WaveMemoryManager
impl WaveMemoryManager
Sourcepub fn new(storage_dir: Option<&Path>) -> Self
pub fn new(storage_dir: Option<&Path>) -> Self
Create or load memory manager WARNING: This allocates a 4.29 billion voxel grid - use new_test() for tests!
Sourcepub fn new_compact(storage_dir: Option<&Path>) -> Self
pub fn new_compact(storage_dir: Option<&Path>) -> Self
Create memory manager with compact grid (256×256×256) Use this for daemons and memory-constrained environments
Sourcepub fn anchor(
&mut self,
content: String,
keywords: Vec<String>,
memory_type: MemoryType,
valence: f32,
arousal: f32,
origin: String,
project_path: Option<PathBuf>,
) -> Result<String>
pub fn anchor( &mut self, content: String, keywords: Vec<String>, memory_type: MemoryType, valence: f32, arousal: f32, origin: String, project_path: Option<PathBuf>, ) -> Result<String>
Anchor a new memory
Sourcepub fn find_by_keywords(
&mut self,
keywords: &[String],
max_results: usize,
) -> Vec<AnchoredMemory>
pub fn find_by_keywords( &mut self, keywords: &[String], max_results: usize, ) -> Vec<AnchoredMemory>
Find memories by keywords (fast lookup) Returns cloned memories to avoid borrow conflicts
Sourcepub fn find_by_resonance(
&mut self,
query_content: &str,
query_keywords: &[String],
query_type: MemoryType,
threshold: f32,
max_results: usize,
) -> Vec<(AnchoredMemory, f32)>
pub fn find_by_resonance( &mut self, query_content: &str, query_keywords: &[String], query_type: MemoryType, threshold: f32, max_results: usize, ) -> Vec<(AnchoredMemory, f32)>
Find memories by resonance (semantic similarity) Returns cloned memories with resonance scores
Sourcepub fn get_interference(&self, x: u8, y: u8, z: u16, t: f32) -> f32
pub fn get_interference(&self, x: u8, y: u8, z: u16, t: f32) -> f32
Get wave interference pattern at a location
Sourcepub fn get(&self, id: &str) -> Option<&AnchoredMemory>
pub fn get(&self, id: &str) -> Option<&AnchoredMemory>
Get a memory by ID
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WaveMemoryManager
impl RefUnwindSafe for WaveMemoryManager
impl Send for WaveMemoryManager
impl Sync for WaveMemoryManager
impl Unpin for WaveMemoryManager
impl UnsafeUnpin for WaveMemoryManager
impl UnwindSafe for WaveMemoryManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more