pub trait ContextProvider: Send + Sync {
// Required methods
fn procedure_state<'life0, 'async_trait>(
&'life0 self,
procedure_id: ProcedureId,
) -> Pin<Box<dyn Future<Output = Result<Option<ProcedureState>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn try_put_poison<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 PoisonKey,
procedure_id: ProcedureId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}
Expand description
ContextProvider provides information about procedures in the ProcedureManager.
Required Methods§
Sourcefn procedure_state<'life0, 'async_trait>(
&'life0 self,
procedure_id: ProcedureId,
) -> Pin<Box<dyn Future<Output = Result<Option<ProcedureState>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn procedure_state<'life0, 'async_trait>(
&'life0 self,
procedure_id: ProcedureId,
) -> Pin<Box<dyn Future<Output = Result<Option<ProcedureState>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Query the procedure state.
Sourcefn try_put_poison<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 PoisonKey,
procedure_id: ProcedureId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn try_put_poison<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 PoisonKey,
procedure_id: ProcedureId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Try to put a poison key for a procedure.
This method is used to mark a resource as being operated on by a procedure. If the poison key already exists with a different value, the operation will fail.