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<'_>,
    ) -> Result<(), PayloadError<ProjectError>>;
    fn execute(
        &mut self,
        project: &Project,
    ) -> Result<(), PayloadError<BuildException>>;
    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<'_>, ) -> Result<(), PayloadError<ProjectError>>

Try to set values from a decoder

Source

fn execute( &mut self, project: &Project, ) -> Result<(), PayloadError<BuildException>>

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

Implementations on Foreign Types§

Source§

impl ExecutableTask for Box<dyn FullTask>

Source§

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

Implementors§

Source§

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

Source§

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