pub trait MemoryStore: Send + Sync {
// Required methods
fn remember<'life0, 'life1, 'async_trait>(
&'life0 self,
env: &'life1 AmpEnvelope,
) -> Pin<Box<dyn Future<Output = Result<AmpResult, AmpError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn recall<'life0, 'life1, 'async_trait>(
&'life0 self,
env: &'life1 AmpEnvelope,
) -> Pin<Box<dyn Future<Output = Result<AmpResult, AmpError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn forget<'life0, 'life1, 'async_trait>(
&'life0 self,
env: &'life1 AmpEnvelope,
) -> Pin<Box<dyn Future<Output = Result<AmpResult, AmpError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn merge<'life0, 'life1, 'async_trait>(
&'life0 self,
env: &'life1 AmpEnvelope,
) -> Pin<Box<dyn Future<Output = Result<AmpResult, AmpError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn expire<'life0, 'life1, 'async_trait>(
&'life0 self,
env: &'life1 AmpEnvelope,
) -> Pin<Box<dyn Future<Output = Result<AmpResult, AmpError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided method
fn dispatch<'life0, 'life1, 'async_trait>(
&'life0 self,
env: &'life1 AmpEnvelope,
) -> Pin<Box<dyn Future<Output = Result<AmpResult, AmpError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}Expand description
The AMP MemoryStore surface: 5 ops, each returning an
AmpResult. Transport adapters (REST / MCP / a fan-out router)
call these.
Required Methods§
fn remember<'life0, 'life1, 'async_trait>(
&'life0 self,
env: &'life1 AmpEnvelope,
) -> Pin<Box<dyn Future<Output = Result<AmpResult, AmpError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn recall<'life0, 'life1, 'async_trait>(
&'life0 self,
env: &'life1 AmpEnvelope,
) -> Pin<Box<dyn Future<Output = Result<AmpResult, AmpError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn forget<'life0, 'life1, 'async_trait>(
&'life0 self,
env: &'life1 AmpEnvelope,
) -> Pin<Box<dyn Future<Output = Result<AmpResult, AmpError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn merge<'life0, 'life1, 'async_trait>(
&'life0 self,
env: &'life1 AmpEnvelope,
) -> Pin<Box<dyn Future<Output = Result<AmpResult, AmpError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn expire<'life0, 'life1, 'async_trait>(
&'life0 self,
env: &'life1 AmpEnvelope,
) -> Pin<Box<dyn Future<Output = Result<AmpResult, AmpError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".