Skip to main content

Task

Trait Task 

Source
pub trait Task {
    // Required method
    fn query_status<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Status, Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;

    // Provided method
    fn wait_till_complete<'life0, 'async_trait>(
        &'life0 self,
        timeout: Option<Duration>,
    ) -> Pin<Box<dyn Future<Output = Result<Status, Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: Sync + 'async_trait { ... }
}
Expand description

Base task interface

Required Methods§

Source

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

interface for query specific task status

Provided Methods§

Source

fn wait_till_complete<'life0, 'async_trait>( &'life0 self, timeout: Option<Duration>, ) -> Pin<Box<dyn Future<Output = Result<Status, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: Sync + 'async_trait,

Wait until query status is complete, an error occurs, or the timeout has elapsed.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§