pub struct TaskResolver { /* private fields */ }Expand description
Resolves tasks
Implementations§
Source§impl TaskResolver
impl TaskResolver
Sourcepub fn new(project: &SharedProject) -> Self
pub fn new(project: &SharedProject) -> Self
Create a new instance of a task resolver for a project
pub fn find_task( &self, task_id: &TaskId, ) -> Result<Box<dyn FullTask>, PayloadError<ConstructionError>>
Sourcepub fn to_execution_graph(
self,
tasks: TaskRequests,
) -> Result<ExecutionGraph, PayloadError<ConstructionError>>
pub fn to_execution_graph( self, tasks: TaskRequests, ) -> Result<ExecutionGraph, PayloadError<ConstructionError>>
Create a task resolver using the given set of tasks as a starting point. Not all tasks registered to the project will be added to the tasks, just the ones that are required for the specified tasks to be ran.
§Error
Will return Err() if any of the ExecutionGraph rules are invalidated.
§Example
use assemble_core::defaults::tasks::Empty;
project.register_task::<Empty>("task1").unwrap();
project.register_task::<Empty>("task2").unwrap().configure_with(|task, _| {
task.depends_on("task1");
Ok(())
}).unwrap();Auto Trait Implementations§
impl Freeze for TaskResolver
impl !RefUnwindSafe for TaskResolver
impl Send for TaskResolver
impl Sync for TaskResolver
impl Unpin for TaskResolver
impl !UnwindSafe for TaskResolver
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<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