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§
Sourcefn new(
using_id: &TaskId,
project: &Project,
) -> Result<Self, PayloadError<ProjectError>>
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§
Sourcefn description() -> String
fn description() -> String
The default description for a Task
Sourcefn options_declarations() -> Option<OptionDeclarations>
fn options_declarations() -> Option<OptionDeclarations>
Gets an optional flags for this task.
By defaults return None
Sourcefn try_set_from_decoder(
&mut self,
_decoder: &OptionsDecoder<'_>,
) -> Result<(), PayloadError<ProjectError>>
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.