Skip to main content

ExecutableTask

Trait ExecutableTask 

Source
pub trait ExecutableTask:
    HasTaskId
    + Send
    + Sync {
    // Required methods
    fn options_declarations(&self) -> Option<OptionDeclarations>;
    fn try_set_from_decoder(
        &mut self,
        decoder: &OptionsDecoder<'_>,
    ) -> ProjectResult<()>;
    fn execute(&mut self, project: &Project) -> BuildResult;
    fn did_work(&self) -> bool;
    fn task_up_to_date(&self) -> bool;
    fn group(&self) -> String;
    fn description(&self) -> String;
}
Expand description

A object safe generic trait for executing tasks

Required Methods§

Source

fn options_declarations(&self) -> Option<OptionDeclarations>

Get the options declaration for this task

Source

fn try_set_from_decoder( &mut self, decoder: &OptionsDecoder<'_>, ) -> ProjectResult<()>

Try to set values from a decoder

Source

fn execute(&mut self, project: &Project) -> BuildResult

Executes the task, with a given project

Source

fn did_work(&self) -> bool

Checks if this task did work

Source

fn task_up_to_date(&self) -> bool

Check if this task marked itself as up to date

Source

fn group(&self) -> String

Gets the group of the task

Source

fn description(&self) -> String

Gets the description of the task

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl ExecutableTask for Box<dyn FullTask>

Source§

impl<E: ExecutableTask + Send + Sync> ExecutableTask for Arc<RwLock<E>>

Implementors§

Source§

impl<T: 'static + Task + Send + Sync + Debug> ExecutableTask for Executable<T>

Source§

impl<T: Task + Send + Sync + Debug + 'static> ExecutableTask for TaskHandle<T>