pub struct MemoryTaxonomy {
pub wings: HashMap<String, Wing>,
pub tunnels: Vec<Tunnel>,
}Expand description
Full memory palace
Fields§
§wings: HashMap<String, Wing>§tunnels: Vec<Tunnel>Implementations§
Source§impl MemoryTaxonomy
impl MemoryTaxonomy
Sourcepub fn ingest(&mut self, wing: &str, room: &str, source_file: &str, text: &str)
pub fn ingest(&mut self, wing: &str, room: &str, source_file: &str, text: &str)
Store verbatim text: chunk into 800-char pieces with 100-char overlap.
Sourcepub fn add_closet(&mut self, wing: &str, room: &str, closet: Closet)
pub fn add_closet(&mut self, wing: &str, room: &str, closet: Closet)
Add a closet (secondary index entry).
Sourcepub fn add_tunnel(&mut self, tunnel: Tunnel)
pub fn add_tunnel(&mut self, tunnel: Tunnel)
Add a tunnel (cross-wing relation).
Sourcepub fn drawers_in_scope(&self, wing: &str, room: &str) -> Vec<&Drawer>
pub fn drawers_in_scope(&self, wing: &str, room: &str) -> Vec<&Drawer>
Get all drawers in a scope (wing/room).
Sourcepub fn tunnels_from(&self, wing: &str, room: &str) -> Vec<&Tunnel>
pub fn tunnels_from(&self, wing: &str, room: &str) -> Vec<&Tunnel>
Get tunnels originating from a scope.
Sourcepub fn find_drawer(&self, id: &str) -> Option<&Drawer>
pub fn find_drawer(&self, id: &str) -> Option<&Drawer>
Find a drawer by ID across all wings/rooms.
Sourcepub fn find_drawer_mut(&mut self, id: &str) -> Option<&mut Drawer>
pub fn find_drawer_mut(&mut self, id: &str) -> Option<&mut Drawer>
Find a mutable drawer by ID across all wings/rooms.
Sourcepub fn linked_active_ids(&self, drawer_id: &str) -> Vec<String>
pub fn linked_active_ids(&self, drawer_id: &str) -> Vec<String>
Get all active (non-superseded) drawer IDs linked to a given drawer.
Trait Implementations§
Source§impl Debug for MemoryTaxonomy
impl Debug for MemoryTaxonomy
Source§impl Default for MemoryTaxonomy
impl Default for MemoryTaxonomy
Source§fn default() -> MemoryTaxonomy
fn default() -> MemoryTaxonomy
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MemoryTaxonomy
impl RefUnwindSafe for MemoryTaxonomy
impl Send for MemoryTaxonomy
impl Sync for MemoryTaxonomy
impl Unpin for MemoryTaxonomy
impl UnsafeUnpin for MemoryTaxonomy
impl UnwindSafe for MemoryTaxonomy
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