pub trait RawHandler {
// Required methods
fn selector(&self) -> &WorkerSelector;
fn output_format(&self) -> TaskDataFormat;
fn supported_task(&self) -> Option<SupportedTask>;
fn run<'life0, 'async_trait>(
&'life0 self,
context: TaskContext,
task: TaskDefinition,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
A handler that works with raw input and output without task type attached.
Required Methods§
Sourcefn selector(&self) -> &WorkerSelector
fn selector(&self) -> &WorkerSelector
Return the selector that should be used to match tasks to this handler.
Sourcefn output_format(&self) -> TaskDataFormat
fn output_format(&self) -> TaskDataFormat
The data format of the task output.
Sourcefn supported_task(&self) -> Option<SupportedTask>
fn supported_task(&self) -> Option<SupportedTask>
Optional information about the supported task expected by this handler.