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) -> ProjectResult
pub fn do_last<F>(&mut self, a: F) -> ProjectResult
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§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<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.
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