Skip to main content

Driver

Trait Driver 

Source
pub trait Driver: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn available<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn start<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        task: &'life1 Task,
        alloc_dir: &'life2 Path,
    ) -> Pin<Box<dyn Future<Output = Result<TaskHandle>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn stop<'life0, 'life1, 'async_trait>(
        &'life0 self,
        handle: &'life1 TaskHandle,
        timeout: Duration,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn status<'life0, 'life1, 'async_trait>(
        &'life0 self,
        handle: &'life1 TaskHandle,
    ) -> Pin<Box<dyn Future<Output = Result<TaskRunState>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn logs<'life0, 'life1, 'async_trait>(
        &'life0 self,
        handle: &'life1 TaskHandle,
    ) -> Pin<Box<dyn Future<Output = Result<Receiver<LogEntry>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}

Required Methods§

Source

fn name(&self) -> &str

Source

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

Source

fn start<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, task: &'life1 Task, alloc_dir: &'life2 Path, ) -> Pin<Box<dyn Future<Output = Result<TaskHandle>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn stop<'life0, 'life1, 'async_trait>( &'life0 self, handle: &'life1 TaskHandle, timeout: Duration, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn status<'life0, 'life1, 'async_trait>( &'life0 self, handle: &'life1 TaskHandle, ) -> Pin<Box<dyn Future<Output = Result<TaskRunState>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn logs<'life0, 'life1, 'async_trait>( &'life0 self, handle: &'life1 TaskHandle, ) -> Pin<Box<dyn Future<Output = Result<Receiver<LogEntry>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§