pub trait ProcessingStepHandler: Send + Sync {
// Required methods
fn handles(&self) -> ProcessingStepType;
fn execute<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
step: &'life1 ProcessingStep,
ctx: &'life2 ProcessingContext<'life3>,
) -> Pin<Box<dyn Future<Output = Result<ProcessingStepOutput>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn validate(&self, step: &ProcessingStep) -> Result<()>;
}Expand description
Handler trait for processing phase steps
Currently implemented by:
ScoringStepHandler- Risk scoring based on indicators
Required Methods§
Sourcefn handles(&self) -> ProcessingStepType
fn handles(&self) -> ProcessingStepType
Which step type this handler processes
Sourcefn execute<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
step: &'life1 ProcessingStep,
ctx: &'life2 ProcessingContext<'life3>,
) -> Pin<Box<dyn Future<Output = Result<ProcessingStepOutput>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn execute<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
step: &'life1 ProcessingStep,
ctx: &'life2 ProcessingContext<'life3>,
) -> Pin<Box<dyn Future<Output = Result<ProcessingStepOutput>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Execute the processing step
Processing steps:
- Read data from acquisition results via
ctx.acquisition_results() - Perform computation (scoring, aggregation, etc.)
- Write results to JSONL via
ctx.writer(step_name) - Return ProcessingStepOutput with ResultHandle
Sourcefn validate(&self, step: &ProcessingStep) -> Result<()>
fn validate(&self, step: &ProcessingStep) -> Result<()>
Validate step configuration