pub trait QueryService: Send + Sync {
// Required method
fn query<'life0, 'life1, 'async_trait>(
&'life0 self,
target: &'life1 WorkflowHandle,
name: String,
) -> Pin<Box<dyn Future<Output = Result<Payload, EngineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
AT-007 query-dispatch seam.
Implementations dispatch a read-only query to workflow code and map their
query errors into EngineError. The engine only resolves the live target
handle and delegates to this trait.
Required Methods§
Sourcefn query<'life0, 'life1, 'async_trait>(
&'life0 self,
target: &'life1 WorkflowHandle,
name: String,
) -> Pin<Box<dyn Future<Output = Result<Payload, EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn query<'life0, 'life1, 'async_trait>(
&'life0 self,
target: &'life1 WorkflowHandle,
name: String,
) -> Pin<Box<dyn Future<Output = Result<Payload, EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Dispatch a named query to the already-resolved workflow target.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".