pub trait PoolStore: Send + Sync {
// Required methods
fn put_task<'life0, 'async_trait>(
&'life0 self,
record: TaskRecord,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_task<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 TaskId,
) -> Pin<Box<dyn Future<Output = Result<Option<TaskRecord>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn list_tasks<'life0, 'life1, 'async_trait>(
&'life0 self,
filter: &'life1 TaskFilter,
) -> Pin<Box<dyn Future<Output = Result<Vec<TaskRecord>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn delete_task<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 TaskId,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn put_slot<'life0, 'async_trait>(
&'life0 self,
record: SlotRecord,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_slot<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 SlotId,
) -> Pin<Box<dyn Future<Output = Result<Option<SlotRecord>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn list_slots<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<SlotRecord>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete_slot<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 SlotId,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Trait for storing and retrieving pool state.
Implementations must be Send + Sync for use in async contexts.
Required Methods§
Sourcefn put_task<'life0, 'async_trait>(
&'life0 self,
record: TaskRecord,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn put_task<'life0, 'async_trait>(
&'life0 self,
record: TaskRecord,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Insert or update a task record.
Sourcefn get_task<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 TaskId,
) -> Pin<Box<dyn Future<Output = Result<Option<TaskRecord>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_task<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 TaskId,
) -> Pin<Box<dyn Future<Output = Result<Option<TaskRecord>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get a task by ID.
Sourcefn list_tasks<'life0, 'life1, 'async_trait>(
&'life0 self,
filter: &'life1 TaskFilter,
) -> Pin<Box<dyn Future<Output = Result<Vec<TaskRecord>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_tasks<'life0, 'life1, 'async_trait>(
&'life0 self,
filter: &'life1 TaskFilter,
) -> Pin<Box<dyn Future<Output = Result<Vec<TaskRecord>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
List tasks matching an optional filter.
Sourcefn delete_task<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 TaskId,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_task<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 TaskId,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete a task record.
Sourcefn put_slot<'life0, 'async_trait>(
&'life0 self,
record: SlotRecord,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn put_slot<'life0, 'async_trait>(
&'life0 self,
record: SlotRecord,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Insert or update a slot record.
Sourcefn get_slot<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 SlotId,
) -> Pin<Box<dyn Future<Output = Result<Option<SlotRecord>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_slot<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 SlotId,
) -> Pin<Box<dyn Future<Output = Result<Option<SlotRecord>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get a slot by ID.
Sourcefn list_slots<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<SlotRecord>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_slots<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<SlotRecord>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List all slots.