pub struct Executable<T>where
T: Task,{
pub task: T,
/* private fields */
}
Expand description
The wrapped task itself
Fields§
§task: T
Implementations§
Source§impl<T> Executable<T>
impl<T> Executable<T>
pub fn new<Id>(shared: SharedProject, task: T, task_id: Id) -> Executable<T>
Sourcepub fn initialize(
&mut self,
project: &Project,
) -> Result<(), PayloadError<ProjectError>>
pub fn initialize( &mut self, project: &Project, ) -> Result<(), PayloadError<ProjectError>>
Initialize the executable.
Sourcepub fn configure_io(&mut self) -> Result<(), PayloadError<ProjectError>>
pub fn configure_io(&mut self) -> Result<(), PayloadError<ProjectError>>
Configures the io of this executable. Ran after the task is initialized.
pub fn depends_on<B>(&mut self, buildable: B)
pub fn do_first<F>(&mut self, a: F) -> Result<(), PayloadError<ProjectError>>where
F: Fn(&mut Executable<T>, &Project) -> Result<(), PayloadError<BuildException>> + 'static + Send + Sync,
pub fn do_last<F>(&mut self, a: F) -> Result<(), PayloadError<ProjectError>>where
F: Fn(&mut Executable<T>, &Project) -> Result<(), PayloadError<BuildException>> + '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>(&mut self, configure: F)
pub fn up_to_date<F>(&mut self, configure: F)
Add an up-to-date check
Trait Implementations§
Source§impl<T> BuildableTask for Executable<T>
impl<T> BuildableTask for Executable<T>
Source§fn ordering(&self) -> Vec<TaskOrdering>
fn ordering(&self) -> Vec<TaskOrdering>
Gets the total ordering associated with the task. This includes all types of ordering,
including those that aren’t strict dependencies. Read more
Source§fn built_by(&self) -> BuiltByContainer
fn built_by(&self) -> BuiltByContainer
Gets the tasks that this task depends on
Source§impl<T> Debug for Executable<T>
impl<T> Debug for Executable<T>
Source§impl<AT> Dependency for Executable<AT>where
AT: ArtifactTask,
impl<AT> Dependency for Executable<AT>where
AT: ArtifactTask,
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> Deref for Executable<T>where
T: Task,
impl<T> Deref for Executable<T>where
T: Task,
Source§impl<T> DerefMut for Executable<T>where
T: Task,
impl<T> DerefMut for Executable<T>where
T: Task,
Source§impl<T> ExecutableTask for Executable<T>
impl<T> 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<'_>,
) -> Result<(), PayloadError<ProjectError>>
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>>
fn execute( &mut self, project: &Project, ) -> Result<(), PayloadError<BuildException>>
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> GetBuildable for Executable<AT>where
AT: ArtifactTask,
impl<AT> GetBuildable for Executable<AT>where
AT: ArtifactTask,
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> HasTaskId for Executable<T>
impl<T> HasTaskId for Executable<T>
Source§impl<T> IntoBuildable for &Executable<T>
impl<T> IntoBuildable for &Executable<T>
type Buildable = BuiltByContainer
Source§fn into_buildable(self) -> <&Executable<T> as IntoBuildable>::Buildable
fn into_buildable(self) -> <&Executable<T> as IntoBuildable>::Buildable
Returns a dependency which contains the tasks which build this object.
Auto Trait Implementations§
impl<T> !Freeze for Executable<T>
impl<T> !RefUnwindSafe for Executable<T>
impl<T> Send for Executable<T>where
T: Send,
impl<T> Sync for Executable<T>where
T: Sync,
impl<T> Unpin for Executable<T>where
T: Unpin,
impl<T> !UnwindSafe for Executable<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> InstanceOf for T
impl<T> InstanceOf for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<D> IntoDependency for Dwhere
D: Dependency,
impl<D> IntoDependency for Dwhere
D: Dependency,
type IntoDep = D
Source§fn into_dependency(self) -> <D as IntoDependency>::IntoDep
fn into_dependency(self) -> <D as IntoDependency>::IntoDep
Turn this type into a dependency
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more