pub trait InputProcessor: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn process<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
input: &'life1 str,
ctx: &'life2 PolicyContext,
) -> Pin<Box<dyn Future<Output = Result<InputProcessorResult>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
// Provided method
fn priority(&self) -> u32 { ... }
}Expand description
Input Processor trait
Processors run BEFORE execution to validate/transform user input. They MUST NOT have side effects beyond logging.