pub trait ProcessStoreHarness: Send + Sync {
// Required method
fn open<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Arc<dyn ProcessStore>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided method
fn is_durable(&self) -> bool { ... }
}Expand description
Opens a ProcessStore backend for the conformance suite.
§Example
use std::sync::Arc;
use adk_kernel::conformance::ProcessStoreHarness;
use adk_kernel::{InMemoryProcessStore, ProcessStore};
struct InMemory;
#[async_trait::async_trait]
impl ProcessStoreHarness for InMemory {
async fn open(&self) -> Arc<dyn ProcessStore> {
Arc::new(InMemoryProcessStore::new())
}
fn is_durable(&self) -> bool {
false
}
}Required Methods§
Sourcefn open<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Arc<dyn ProcessStore>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn open<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Arc<dyn ProcessStore>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Opens a store. For a durable backend every call returns a new handle over the same stored data. Panics when the backend cannot be opened.
Provided Methods§
Sourcefn is_durable(&self) -> bool
fn is_durable(&self) -> bool
Whether data written through one handle is visible through the next. false skips
the restart case and runs the concurrency case on a single handle.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".