Struct InMemory Backend
Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-ffi.
In-memory backend storing adaptive state in process-local hash maps.
This backend is primarily useful for tests, examples, or deployments where adaptive state does not need to survive process restarts.
Implementations
impl InMemoryBackend
impl InMemoryBackend
new
pub fn new() -> Self
Create an empty in-memory backend.
Returns
A new InMemoryBackend with empty storage maps.
Trait Implementations
impl Default for InMemoryBackend
impl Default for InMemoryBackend
default
fn default() -> Self
impl StorageBackend for InMemoryBackend
impl StorageBackend for InMemoryBackend
store_run
fn store_run(
&self,
record: &RunRecord,
) -> impl Future<Output = Result<()>> + Send
load_plan
fn load_plan(
&self,
agent_id: &str,
) -> impl Future<Output = Result<Option<ExecutionPlan>>> + Send
list_runs
fn list_runs(
&self,
agent_id: &str,
) -> impl Future<Output = Result<Vec<RunRecord>>> + Send
impl StorageBackendDyn for InMemoryBackend
impl StorageBackendDyn for InMemoryBackend
store_run_dyn
fn store_run_dyn<'a>(
&'a self,
record: &'a RunRecord,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
load_plan_dyn
fn load_plan_dyn<'a>(
&'a self,
agent_id: &'a str,
) -> Pin<Box<dyn Future<Output = Result<Option<ExecutionPlan>>> + Send + 'a>>
list_runs_dyn
fn list_runs_dyn<'a>(
&'a self,
agent_id: &'a str,
) -> Pin<Box<dyn Future<Output = Result<Vec<RunRecord>>> + Send + 'a>>
store_trie
fn store_trie<'a>(
&'a self,
agent_id: &'a str,
envelope: &'a TrieEnvelope,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
load_trie
fn load_trie<'a>(
&'a self,
agent_id: &'a str,
) -> Pin<Box<dyn Future<Output = Result<Option<TrieEnvelope>>> + Send + 'a>>
store_accumulators
fn store_accumulators<'a>(
&'a self,
agent_id: &'a str,
state: &'a AccumulatorState,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
load_accumulators
fn load_accumulators<'a>(
&'a self,
agent_id: &'a str,
) -> Pin<Box<dyn Future<Output = Result<Option<AccumulatorState>>> + Send + 'a>>
store_plan
fn store_plan(&self, plan: &ExecutionPlan) -> Result<()>
store_observations
fn store_observations<'a>(
&'a self,
agent_id: &'a str,
observations: &'a [PromptIR],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
load_observations
fn load_observations<'a>(
&'a self,
agent_id: &'a str,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<PromptIR>>>> + Send + 'a>>
store_stability
fn store_stability<'a>(
&'a self,
agent_id: &'a str,
result: &'a StabilityAnalysisResult,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
load_stability
fn load_stability<'a>(
&'a self,
agent_id: &'a str,
) -> Pin<Box<dyn Future<Output = Result<Option<StabilityAnalysisResult>>> + Send + 'a>>