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.
impl InMemoryBackendimpl InMemoryBackend
newpub fn new() -> Self
Create an empty in-memory backend.
A new InMemoryBackend with empty storage maps.
impl Default for InMemoryBackendimpl Default for InMemoryBackend
defaultfn default() -> Self
impl StorageBackend for InMemoryBackendimpl StorageBackend for InMemoryBackend
store_runfn store_run(
&self,
record: &RunRecord,
) -> impl Future<Output = Result<()>> + Send
load_planfn load_plan(
&self,
agent_id: &str,
) -> impl Future<Output = Result<Option<ExecutionPlan>>> + Send
list_runsfn list_runs(
&self,
agent_id: &str,
) -> impl Future<Output = Result<Vec<RunRecord>>> + Send
impl StorageBackendDyn for InMemoryBackendimpl StorageBackendDyn for InMemoryBackend
store_run_dynfn store_run_dyn<'a>(
&'a self,
record: &'a RunRecord,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
load_plan_dynfn load_plan_dyn<'a>(
&'a self,
agent_id: &'a str,
) -> Pin<Box<dyn Future<Output = Result<Option<ExecutionPlan>>> + Send + 'a>>
list_runs_dynfn list_runs_dyn<'a>(
&'a self,
agent_id: &'a str,
) -> Pin<Box<dyn Future<Output = Result<Vec<RunRecord>>> + Send + 'a>>
store_triefn store_trie<'a>(
&'a self,
agent_id: &'a str,
envelope: &'a TrieEnvelope,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
load_triefn load_trie<'a>(
&'a self,
agent_id: &'a str,
) -> Pin<Box<dyn Future<Output = Result<Option<TrieEnvelope>>> + Send + 'a>>
store_accumulatorsfn store_accumulators<'a>(
&'a self,
agent_id: &'a str,
state: &'a AccumulatorState,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
load_accumulatorsfn load_accumulators<'a>(
&'a self,
agent_id: &'a str,
) -> Pin<Box<dyn Future<Output = Result<Option<AccumulatorState>>> + Send + 'a>>
store_planfn store_plan(&self, plan: &ExecutionPlan) -> Result<()>
store_observationsfn store_observations<'a>(
&'a self,
agent_id: &'a str,
observations: &'a [PromptIR],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
load_observationsfn load_observations<'a>(
&'a self,
agent_id: &'a str,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<PromptIR>>>> + Send + 'a>>
store_stabilityfn store_stability<'a>(
&'a self,
agent_id: &'a str,
result: &'a StabilityAnalysisResult,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
load_stabilityfn load_stability<'a>(
&'a self,
agent_id: &'a str,
) -> Pin<Box<dyn Future<Output = Result<Option<StabilityAnalysisResult>>> + Send + 'a>>