Struct assemble_core::Executable
source · pub struct Executable<T: Task> {
pub task: T,
/* private fields */
}
Expand description
The wrapped task itself
Fields§
§task: T
Implementations§
source§impl<T: 'static + Task + Send + Debug> Executable<T>
impl<T: 'static + Task + Send + Debug> Executable<T>
pub fn new<Id: AsRef<TaskId>>(shared: SharedProject, task: T, task_id: Id) -> Self
sourcepub fn initialize(&mut self, project: &Project) -> ProjectResult
pub fn initialize(&mut self, project: &Project) -> ProjectResult
Initialize the executable.
sourcepub fn configure_io(&mut self) -> ProjectResult
pub fn configure_io(&mut self) -> ProjectResult
Configures the io of this executable. Ran after the task is initialized.
pub fn depends_on<B: IntoBuildable>(&mut self, buildable: B)where
B::Buildable: 'static,
pub fn do_first<F>(&mut self, a: F) -> ProjectResultwhere
F: Fn(&mut Executable<T>, &Project) -> BuildResult + 'static + Send + Sync,
pub fn do_last<F>(&mut self, a: F) -> ProjectResultwhere
F: Fn(&mut Executable<T>, &Project) -> BuildResult + 'static + Send + Sync,
pub fn project(&self) -> SharedProject
pub fn work(&mut self) -> &mut WorkHandler
pub fn set_description(&mut self, description: &str)
pub fn set_group(&mut self, group: &str)
sourcepub fn up_to_date<F: Fn(&Executable<T>) -> bool + Send + Sync + 'static>(
&mut self,
configure: F
)
pub fn up_to_date<F: Fn(&Executable<T>) -> bool + Send + Sync + 'static>(
&mut self,
configure: F
)
Add an up-to-date check
Trait Implementations§
source§impl<T: 'static + Task + Send + Debug> BuildableTask for Executable<T>
impl<T: 'static + Task + Send + Debug> BuildableTask for Executable<T>
source§impl<AT: ArtifactTask> Dependency for Executable<AT>
impl<AT: ArtifactTask> Dependency for Executable<AT>
source§fn dep_type(&self) -> DependencyType
fn dep_type(&self) -> DependencyType
The type of the dependency
source§fn try_resolve(
&self,
_: &dyn Registry,
_: &Path
) -> Result<ResolvedDependency, AcquisitionError>
fn try_resolve(
&self,
_: &dyn Registry,
_: &Path
) -> Result<ResolvedDependency, AcquisitionError>
Try to resolve a dependency in a registry. The
cache_path
is somewhere to write files into
if necessary.source§impl<T: Task> Deref for Executable<T>
impl<T: Task> Deref for Executable<T>
source§impl<T: Task> DerefMut for Executable<T>
impl<T: Task> DerefMut for Executable<T>
source§impl<T: 'static + Task + Send + Sync + Debug> ExecutableTask for Executable<T>
impl<T: 'static + Task + Send + Sync + Debug> ExecutableTask for Executable<T>
source§fn options_declarations(&self) -> Option<OptionDeclarations>
fn options_declarations(&self) -> Option<OptionDeclarations>
Get the options declaration for this task
source§fn try_set_from_decoder(
&mut self,
decoder: &OptionsDecoder<'_>
) -> ProjectResult<()>
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
fn execute(&mut self, project: &Project) -> BuildResult
Executes the task, with a given project
source§fn task_up_to_date(&self) -> bool
fn task_up_to_date(&self) -> bool
Check if this task marked itself as up to date
source§fn description(&self) -> String
fn description(&self) -> String
Gets the description of the task
source§impl<AT: ArtifactTask> GetBuildable for Executable<AT>
impl<AT: ArtifactTask> GetBuildable for Executable<AT>
source§fn as_buildable(&self) -> BuildableObject
fn as_buildable(&self) -> BuildableObject
Returns a dependency which contains the tasks which build this object.
source§impl<T: Task + Send + Debug> IntoBuildable for &Executable<T>
impl<T: Task + Send + Debug> IntoBuildable for &Executable<T>
type Buildable = BuiltByContainer
source§fn into_buildable(self) -> Self::Buildable
fn into_buildable(self) -> Self::Buildable
Returns a dependency which contains the tasks which build this object.