Skip to main content

DataFlowHandler

Trait DataFlowHandler 

Source
pub trait DataFlowHandler: Send + Sync {
    type Transaction;

    // Required methods
    fn can_handle<'life0, 'life1, 'async_trait>(
        &'life0 self,
        flow: &'life1 DataFlow,
    ) -> Pin<Box<dyn Future<Output = HandlerResult<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn on_start<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        tx: &'life1 mut Self::Transaction,
        flow: &'life2 DataFlow,
    ) -> Pin<Box<dyn Future<Output = HandlerResult<DataFlowStatusMessage>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn on_prepare<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        tx: &'life1 mut Self::Transaction,
        flow: &'life2 DataFlow,
    ) -> Pin<Box<dyn Future<Output = HandlerResult<DataFlowStatusMessage>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn on_terminate<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        tx: &'life1 mut Self::Transaction,
        flow: &'life2 DataFlow,
    ) -> Pin<Box<dyn Future<Output = HandlerResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn on_started<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        tx: &'life1 mut Self::Transaction,
        flow: &'life2 DataFlow,
    ) -> Pin<Box<dyn Future<Output = HandlerResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn on_suspend<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        tx: &'life1 mut Self::Transaction,
        flow: &'life2 DataFlow,
    ) -> Pin<Box<dyn Future<Output = HandlerResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;

    // Provided methods
    fn on_completed<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        _tx: &'life1 mut Self::Transaction,
        _flow: &'life2 DataFlow,
    ) -> Pin<Box<dyn Future<Output = HandlerResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait { ... }
    fn on_resume<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        tx: &'life1 mut Self::Transaction,
        flow: &'life2 DataFlow,
    ) -> Pin<Box<dyn Future<Output = HandlerResult<DataFlowStatusMessage>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait { ... }
}

Required Associated Types§

Required Methods§

Source

fn can_handle<'life0, 'life1, 'async_trait>( &'life0 self, flow: &'life1 DataFlow, ) -> Pin<Box<dyn Future<Output = HandlerResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn on_start<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tx: &'life1 mut Self::Transaction, flow: &'life2 DataFlow, ) -> Pin<Box<dyn Future<Output = HandlerResult<DataFlowStatusMessage>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn on_prepare<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tx: &'life1 mut Self::Transaction, flow: &'life2 DataFlow, ) -> Pin<Box<dyn Future<Output = HandlerResult<DataFlowStatusMessage>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn on_terminate<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tx: &'life1 mut Self::Transaction, flow: &'life2 DataFlow, ) -> Pin<Box<dyn Future<Output = HandlerResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn on_started<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tx: &'life1 mut Self::Transaction, flow: &'life2 DataFlow, ) -> Pin<Box<dyn Future<Output = HandlerResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn on_suspend<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tx: &'life1 mut Self::Transaction, flow: &'life2 DataFlow, ) -> Pin<Box<dyn Future<Output = HandlerResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Provided Methods§

Source

fn on_completed<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _tx: &'life1 mut Self::Transaction, _flow: &'life2 DataFlow, ) -> Pin<Box<dyn Future<Output = HandlerResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn on_resume<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tx: &'life1 mut Self::Transaction, flow: &'life2 DataFlow, ) -> Pin<Box<dyn Future<Output = HandlerResult<DataFlowStatusMessage>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§