pub trait WorkflowHandler {
// Required methods
fn handle_scan_repo<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<WorkflowResponseVariant>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn handle_register<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 WorkflowDef,
) -> Pin<Box<dyn Future<Output = Result<WorkflowResponseVariant>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn handle_list<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<WorkflowResponseVariant>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn handle_dispatch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 DispatchRequest,
) -> Pin<Box<dyn Future<Output = Result<WorkflowResponseVariant>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn handle_subscribe<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 SubscribeRequest,
) -> Pin<Box<dyn Future<Output = Result<WorkflowResponseVariant>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn handle_unsubscribe<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<WorkflowResponseVariant>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn handle_get_run<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<WorkflowResponseVariant>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn handle_list_runs<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<WorkflowResponseVariant>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
// Provided methods
fn authorize<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
resource: &'life2 str,
operation: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait { ... }
fn is_resource_authorized<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
resource: &'life2 str,
operation: &'life3 str,
) -> Pin<Box<dyn Future<Output = bool> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait { ... }
}Expand description
Generated handler trait for the Workflow service.
Required Methods§
Sourcefn handle_scan_repo<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<WorkflowResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_scan_repo<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<WorkflowResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Handle scanRepo request.
Sourcefn handle_register<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 WorkflowDef,
) -> Pin<Box<dyn Future<Output = Result<WorkflowResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_register<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 WorkflowDef,
) -> Pin<Box<dyn Future<Output = Result<WorkflowResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Handle register request.
Sourcefn handle_list<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<WorkflowResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_list<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<WorkflowResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Handle list request.
Sourcefn handle_dispatch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 DispatchRequest,
) -> Pin<Box<dyn Future<Output = Result<WorkflowResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_dispatch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 DispatchRequest,
) -> Pin<Box<dyn Future<Output = Result<WorkflowResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Handle dispatch request.
Sourcefn handle_subscribe<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 SubscribeRequest,
) -> Pin<Box<dyn Future<Output = Result<WorkflowResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_subscribe<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 SubscribeRequest,
) -> Pin<Box<dyn Future<Output = Result<WorkflowResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Handle subscribe request.
Sourcefn handle_unsubscribe<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<WorkflowResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_unsubscribe<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<WorkflowResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Handle unsubscribe request.
Sourcefn handle_get_run<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<WorkflowResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_get_run<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<WorkflowResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Handle getRun request.
Sourcefn handle_list_runs<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<WorkflowResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_list_runs<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<WorkflowResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Handle listRuns request.
Provided Methods§
Authorize an operation on a resource. Override to enforce policy.
Called by generated dispatch functions before handler methods. Every
method carries a mandatory $scope/$capability annotation (S3, #547)
except explicit $scopeExempt methods, which are not gated here.
Default: deny all. Services MUST override to enable access.
Check if a specific resource+operation is authorized (non-failing).
Useful for filtering list results per-resource.
Default delegates to authorize().is_ok().