Trait Task

Source
pub trait Task<ERR: Send + Sync, EXEC: Send + Sync>: Send + Sync {
    // Required methods
    fn status(
        &self,
        exec: &EXEC,
    ) -> impl Future<Output = Result<TaskStatus, ERR>> + Send;
    fn delete(
        &self,
        exec: &EXEC,
    ) -> impl Future<Output = Result<(), ERR>> + Send;
    fn start(
        &self,
        exec: &EXEC,
    ) -> impl Future<Output = Result<TaskStatus, ERR>> + Send;
}
Expand description

A task.

Required Methods§

Source

fn status( &self, exec: &EXEC, ) -> impl Future<Output = Result<TaskStatus, ERR>> + Send

Returns the status of the task.

Source

fn delete(&self, exec: &EXEC) -> impl Future<Output = Result<(), ERR>> + Send

Deletes the task.

Source

fn start( &self, exec: &EXEC, ) -> impl Future<Output = Result<TaskStatus, ERR>> + Send

Starts the task.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§