Trait CreateTask

Source
pub trait CreateTask: Sized {
    // Required method
    fn new(
        using_id: &TaskId,
        project: &Project,
    ) -> Result<Self, PayloadError<ProjectError>>;

    // Provided methods
    fn description() -> String { ... }
    fn options_declarations() -> Option<OptionDeclarations> { ... }
    fn try_set_from_decoder(
        &mut self,
        _decoder: &OptionsDecoder<'_>,
    ) -> Result<(), PayloadError<ProjectError>> { ... }
}
Expand description

Create tasks using a project.

Required Methods§

Source

fn new( using_id: &TaskId, project: &Project, ) -> Result<Self, PayloadError<ProjectError>>

Creates a new task. The using_id is the id of the task that’s being created.

Provided Methods§

Source

fn description() -> String

The default description for a Task

Source

fn options_declarations() -> Option<OptionDeclarations>

Gets an optional flags for this task.

By defaults return None

Source

fn try_set_from_decoder( &mut self, _decoder: &OptionsDecoder<'_>, ) -> Result<(), PayloadError<ProjectError>>

Try to get values from a decoder.

By default does not do anything.

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§

Source§

impl CreateTask for Help

Source§

impl CreateTask for TaskReport

Source§

impl CreateTask for assemble_std::defaults::tasks::WrapperTask

Source§

impl CreateTask for DownloadFile

Source§

impl CreateTask for assemble_std::tasks::wrapper::WrapperTask

Source§

impl<T> CreateTask for T
where T: Default + Task,