Skip to main content

Processor

Trait Processor 

Source
pub trait Processor:
    Send
    + Sync
    + DynClone {
    // Required methods
    fn id(&self) -> &'static str;
    fn version(&self) -> &'static str;
    fn process(&self) -> Result<Process>;
    fn execute<'life0, 'async_trait>(
        &'life0 self,
        execute: Execute,
    ) -> Pin<Box<dyn Future<Output = Result<ProcessResponseBody>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Trait for defining and executing a Process

Required Methods§

Source

fn id(&self) -> &'static str

Returns the process id (must be unique)

Source

fn version(&self) -> &'static str

Returns the process version

Source

fn process(&self) -> Result<Process>

Returns the Process description

Source

fn execute<'life0, 'async_trait>( &'life0 self, execute: Execute, ) -> Pin<Box<dyn Future<Output = Result<ProcessResponseBody>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Executes the Process and returns Results

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§