pub struct InMemoryBackend { /* private fields */ }Expand description
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§
Source§impl InMemoryBackend
impl InMemoryBackend
Trait Implementations§
Source§impl Default for InMemoryBackend
impl Default for InMemoryBackend
Source§impl StorageBackend for InMemoryBackend
impl StorageBackend for InMemoryBackend
Source§impl StorageBackendDyn for InMemoryBackend
impl StorageBackendDyn for InMemoryBackend
Source§fn store_run_dyn<'a>(
&'a self,
record: &'a RunRecord,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
fn store_run_dyn<'a>( &'a self, record: &'a RunRecord, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
Persist one observed run.
Source§fn load_plan_dyn<'a>(
&'a self,
agent_id: &'a str,
) -> Pin<Box<dyn Future<Output = Result<Option<ExecutionPlan>>> + Send + 'a>>
fn load_plan_dyn<'a>( &'a self, agent_id: &'a str, ) -> Pin<Box<dyn Future<Output = Result<Option<ExecutionPlan>>> + Send + 'a>>
Load the current execution plan for an agent.
Source§fn list_runs_dyn<'a>(
&'a self,
agent_id: &'a str,
) -> Pin<Box<dyn Future<Output = Result<Vec<RunRecord>>> + Send + 'a>>
fn list_runs_dyn<'a>( &'a self, agent_id: &'a str, ) -> Pin<Box<dyn Future<Output = Result<Vec<RunRecord>>> + Send + 'a>>
List stored runs for an agent.
Source§fn store_trie<'a>(
&'a self,
agent_id: &'a str,
envelope: &'a TrieEnvelope,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
fn store_trie<'a>( &'a self, agent_id: &'a str, envelope: &'a TrieEnvelope, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
Persist a serialized prediction trie for an agent.
Source§fn load_trie<'a>(
&'a self,
agent_id: &'a str,
) -> Pin<Box<dyn Future<Output = Result<Option<TrieEnvelope>>> + Send + 'a>>
fn load_trie<'a>( &'a self, agent_id: &'a str, ) -> Pin<Box<dyn Future<Output = Result<Option<TrieEnvelope>>> + Send + 'a>>
Load the serialized prediction trie for an agent.
Source§fn store_accumulators<'a>(
&'a self,
agent_id: &'a str,
state: &'a AccumulatorState,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
fn store_accumulators<'a>( &'a self, agent_id: &'a str, state: &'a AccumulatorState, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
Persist trie accumulator state for an agent.
Source§fn load_accumulators<'a>(
&'a self,
agent_id: &'a str,
) -> Pin<Box<dyn Future<Output = Result<Option<AccumulatorState>>> + Send + 'a>>
fn load_accumulators<'a>( &'a self, agent_id: &'a str, ) -> Pin<Box<dyn Future<Output = Result<Option<AccumulatorState>>> + Send + 'a>>
Load trie accumulator state for an agent.
Source§fn store_plan(&self, plan: &ExecutionPlan) -> Result<()>
fn store_plan(&self, plan: &ExecutionPlan) -> Result<()>
Persist an execution plan for an agent. Read more
Source§fn store_observations<'a>(
&'a self,
agent_id: &'a str,
observations: &'a [PromptIR],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
fn store_observations<'a>( &'a self, agent_id: &'a str, observations: &'a [PromptIR], ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
Persist prompt IR observations for an agent or derived Adaptive Cache
Governor (ACG) profile. Read more
Source§fn load_observations<'a>(
&'a self,
agent_id: &'a str,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<PromptIR>>>> + Send + 'a>>
fn load_observations<'a>( &'a self, agent_id: &'a str, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<PromptIR>>>> + Send + 'a>>
Load prompt IR observations for an agent or derived Adaptive Cache
Governor (ACG) profile. Read more
Auto Trait Implementations§
impl !Freeze for InMemoryBackend
impl RefUnwindSafe for InMemoryBackend
impl Send for InMemoryBackend
impl Sync for InMemoryBackend
impl Unpin for InMemoryBackend
impl UnsafeUnpin for InMemoryBackend
impl UnwindSafe for InMemoryBackend
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