pub trait Repository: Send + Sync {
// Required methods
fn save<'life0, 'async_trait>(
&'life0 self,
instance: Arc<ProcessInstance>,
) -> Pin<Box<dyn Future<Output = Result<(), RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
instance_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Arc<ProcessInstance>>, RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
instance_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn list_ids<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided method
fn exists<'life0, 'life1, 'async_trait>(
&'life0 self,
instance_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}Expand description
Repository Trait
Trait for process instance repositories. This abstraction allows for different storage backends (memory, database, etc.).
Required Methods§
Sourcefn save<'life0, 'async_trait>(
&'life0 self,
instance: Arc<ProcessInstance>,
) -> Pin<Box<dyn Future<Output = Result<(), RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn save<'life0, 'async_trait>(
&'life0 self,
instance: Arc<ProcessInstance>,
) -> Pin<Box<dyn Future<Output = Result<(), RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Save a process instance
Sourcefn get<'life0, 'life1, 'async_trait>(
&'life0 self,
instance_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Arc<ProcessInstance>>, RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
instance_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Arc<ProcessInstance>>, RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get a process instance by ID
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".