pub trait OutputStore: Send + Sync {
// Required methods
fn append<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
task_id: &'life1 str,
attempt: u32,
producer_agent: &'life2 str,
event: OutputEvent,
parent_refs: Vec<OutputRef>,
) -> Pin<Box<dyn Future<Output = Result<OutputRef, OutputStoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 OutputRef,
) -> Pin<Box<dyn Future<Output = Result<OutputRecord, OutputStoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_latest_by_name<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<OutputRecord, OutputStoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn list_for_attempt<'life0, 'life1, 'async_trait>(
&'life0 self,
task_id: &'life1 str,
attempt: u32,
) -> Pin<Box<dyn Future<Output = Result<Vec<OutputRecord>, OutputStoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
The LC3 (Swarm management) interface.
Backing implementations are pluggable (in-memory, SQLite, filesystem, etc.). The MVP ships only the in-memory backend; SQLite / filesystem backends are a future carry.
Required Methods§
Sourcefn append<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
task_id: &'life1 str,
attempt: u32,
producer_agent: &'life2 str,
event: OutputEvent,
parent_refs: Vec<OutputRef>,
) -> Pin<Box<dyn Future<Output = Result<OutputRef, OutputStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn append<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
task_id: &'life1 str,
attempt: u32,
producer_agent: &'life2 str,
event: OutputEvent,
parent_refs: Vec<OutputRef>,
) -> Pin<Box<dyn Future<Output = Result<OutputRef, OutputStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Intake an event, allocate an id, and register the record. Returns the freshly allocated ref.
Sourcefn get<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 OutputRef,
) -> Pin<Box<dyn Future<Output = Result<OutputRecord, OutputStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 OutputRef,
) -> Pin<Box<dyn Future<Output = Result<OutputRecord, OutputStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Look up a record by id (LC2 IN_REFS resolution — the value handed
to the next spawn on handoff).
Sourcefn get_latest_by_name<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<OutputRecord, OutputStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_latest_by_name<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<OutputRecord, OutputStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Look up the latest record emitted under the given producer name
(out_name addressing — the logical, agent-based sibling of get).
Names are producer-scoped, not task-scoped: the newest emit wins.
Sourcefn list_for_attempt<'life0, 'life1, 'async_trait>(
&'life0 self,
task_id: &'life1 str,
attempt: u32,
) -> Pin<Box<dyn Future<Output = Result<Vec<OutputRecord>, OutputStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_for_attempt<'life0, 'life1, 'async_trait>(
&'life0 self,
task_id: &'life1 str,
attempt: u32,
) -> Pin<Box<dyn Future<Output = Result<Vec<OutputRecord>, OutputStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
List every record for a given (task_id, attempt) pair. Used where
the dispatch path pulls the verdict view.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".