pub trait TaskStore<S: Clone>: Send + Sync {
// Required methods
fn add<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
task: &'life1 TaskMeta<S>,
key: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = ClResult<TaskId>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn finished<'life0, 'life1, 'async_trait>(
&'life0 self,
id: TaskId,
output: &'life1 str,
) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn load<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ClResult<Vec<TaskData>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn update_task_error<'life0, 'life1, 'async_trait>(
&'life0 self,
task_id: TaskId,
output: &'life1 str,
next_at: Option<Timestamp>,
) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn find_by_key<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = ClResult<Option<(TaskId, TaskData)>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn update_task<'life0, 'life1, 'async_trait>(
&'life0 self,
id: TaskId,
task: &'life1 TaskMeta<S>,
) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn find_completed_deps<'life0, 'life1, 'async_trait>(
&'life0 self,
deps: &'life1 [TaskId],
) -> Pin<Box<dyn Future<Output = ClResult<Vec<TaskId>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Required Methods§
fn add<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
task: &'life1 TaskMeta<S>,
key: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = ClResult<TaskId>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn finished<'life0, 'life1, 'async_trait>(
&'life0 self,
id: TaskId,
output: &'life1 str,
) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ClResult<Vec<TaskData>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn update_task_error<'life0, 'life1, 'async_trait>(
&'life0 self,
task_id: TaskId,
output: &'life1 str,
next_at: Option<Timestamp>,
) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn find_by_key<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = ClResult<Option<(TaskId, TaskData)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_task<'life0, 'life1, 'async_trait>(
&'life0 self,
id: TaskId,
task: &'life1 TaskMeta<S>,
) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn find_completed_deps<'life0, 'life1, 'async_trait>(
&'life0 self,
deps: &'life1 [TaskId],
) -> Pin<Box<dyn Future<Output = ClResult<Vec<TaskId>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".