[][src]Trait async_mq::message::MessageProcess

pub trait MessageProcess {
    fn process<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        msg: &'life1 Message
    ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, MessageError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn boxed_clone(&self) -> Box<dyn MessageProcess + Send + Sync>; }

A trait to process the Message and returns the response data or modified data.

Required methods

fn process<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    msg: &'life1 Message
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, MessageError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

Async method to process a message.

fn boxed_clone(&self) -> Box<dyn MessageProcess + Send + Sync>

Loading content...

Implementors

impl MessageProcess for EchoProcessor[src]

fn process<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    msg: &'life1 Message
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, MessageError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Echoe back the request message.

Loading content...