pub struct WorkspaceManager { /* private fields */ }Expand description
Manages multiple memory workspaces.
Implementations§
Source§impl WorkspaceManager
impl WorkspaceManager
pub fn new() -> Self
Sourcepub fn add_context(
&mut self,
workspace_id: &str,
path: &str,
role: ContextRole,
label: Option<String>,
) -> McpResult<String>
pub fn add_context( &mut self, workspace_id: &str, path: &str, role: ContextRole, label: Option<String>, ) -> McpResult<String>
Add a context to a workspace by loading an .amem file.
Sourcepub fn list(&self, workspace_id: &str) -> McpResult<&[MemoryContext]>
pub fn list(&self, workspace_id: &str) -> McpResult<&[MemoryContext]>
List contexts in a workspace.
Sourcepub fn get(&self, workspace_id: &str) -> Option<&MemoryWorkspace>
pub fn get(&self, workspace_id: &str) -> Option<&MemoryWorkspace>
Get a workspace reference.
Sourcepub fn query_all(
&self,
workspace_id: &str,
query: &str,
max_per_context: usize,
) -> McpResult<Vec<CrossContextResult>>
pub fn query_all( &self, workspace_id: &str, query: &str, max_per_context: usize, ) -> McpResult<Vec<CrossContextResult>>
Query across all contexts in a workspace.
Sourcepub fn compare(
&self,
workspace_id: &str,
item: &str,
max_per_context: usize,
) -> McpResult<Comparison>
pub fn compare( &self, workspace_id: &str, item: &str, max_per_context: usize, ) -> McpResult<Comparison>
Compare a topic across all contexts.
Sourcepub fn cross_reference(
&self,
workspace_id: &str,
item: &str,
) -> McpResult<CrossReference>
pub fn cross_reference( &self, workspace_id: &str, item: &str, ) -> McpResult<CrossReference>
Cross-reference: find which contexts have/lack a topic.
Trait Implementations§
Source§impl Default for WorkspaceManager
impl Default for WorkspaceManager
Source§fn default() -> WorkspaceManager
fn default() -> WorkspaceManager
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for WorkspaceManager
impl RefUnwindSafe for WorkspaceManager
impl Send for WorkspaceManager
impl Sync for WorkspaceManager
impl Unpin for WorkspaceManager
impl UnsafeUnpin for WorkspaceManager
impl UnwindSafe for WorkspaceManager
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