Trait Storage Backend
Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-ffi.
pub trait StorageBackend:
Send
+ Sync
+ 'static {
// Required methods
fn store_run(
&self,
record: &RunRecord,
) -> impl Future<Output = Result<()>> + Send;
fn load_plan(
&self,
agent_id: &str,
) -> impl Future<Output = Result<Option<ExecutionPlan>>> + Send;
fn list_runs(
&self,
agent_id: &str,
) -> impl Future<Output = Result<Vec<RunRecord>>> + Send;
}
Minimal async storage interface required by the adaptive runtime.
Required Methods
store_run
fn store_run(
&self,
record: &RunRecord,
) -> impl Future<Output = Result<()>> + Send
Persist one observed run.
load_plan
fn load_plan(
&self,
agent_id: &str,
) -> impl Future<Output = Result<Option<ExecutionPlan>>> + Send
Load the current execution plan for an agent.
list_runs
fn list_runs(
&self,
agent_id: &str,
) -> impl Future<Output = Result<Vec<RunRecord>>> + Send
List stored runs for an agent.
Dyn Compatibility
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called “object safety”, so this trait is not object safe.
Implementors
impl StorageBackend for RedisBackend
impl StorageBackend for RedisBackend
impl StorageBackend for InMemoryBackend
impl StorageBackend for InMemoryBackend