pub struct DurableMemory { /* private fields */ }Expand description
Public durable memory bound to one agent and scope.
This is separate from WorkingMemory, which is an in-process scratch pad, and from
MemoryStore, which remains host-owned storage for runners and public descriptors.
Implementations§
Source§impl DurableMemory
impl DurableMemory
pub fn new( store: Arc<dyn MemoryStore>, agent_id: impl Into<String>, scope: MemoryScope, ) -> Self
pub fn namespace(&self) -> &str
pub async fn search( &self, query: impl Into<String>, options: MemorySearchOptions, ) -> Result<Vec<MemoryRecord>>
pub async fn get(&self, record_id: &str) -> Result<Option<MemoryRecord>>
pub async fn put(&self, record: MemoryRecord) -> Result<()>
pub async fn delete(&self, record_id: &str) -> Result<()>
Auto Trait Implementations§
impl !RefUnwindSafe for DurableMemory
impl !UnwindSafe for DurableMemory
impl Freeze for DurableMemory
impl Send for DurableMemory
impl Sync for DurableMemory
impl Unpin for DurableMemory
impl UnsafeUnpin for DurableMemory
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