Skip to main content

CallbackSender

Trait CallbackSender 

Source
pub trait CallbackSender: Send + Sync {
    // Required methods
    fn send_success<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        callback_id: &'life1 str,
        result: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), TestError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn send_failure<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        callback_id: &'life1 str,
        error: &'life2 TestResultError,
    ) -> Pin<Box<dyn Future<Output = Result<(), TestError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn send_heartbeat<'life0, 'life1, 'async_trait>(
        &'life0 self,
        callback_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), TestError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Trait for sending callback responses.

This trait is implemented by test runners to handle callback interactions.

Required Methods§

Source

fn send_success<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, callback_id: &'life1 str, result: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<(), TestError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Sends a success response for a callback.

Source

fn send_failure<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, callback_id: &'life1 str, error: &'life2 TestResultError, ) -> Pin<Box<dyn Future<Output = Result<(), TestError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Sends a failure response for a callback.

Source

fn send_heartbeat<'life0, 'life1, 'async_trait>( &'life0 self, callback_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), TestError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Sends a heartbeat for a callback.

Implementors§