pub struct TaskContext {
pub task_root: Arc<TaskRoot>,
pub execution_stack: ExecutionStack,
pub multi: Arc<MultiProgress>,
pub env_vars: HashMap<String, String>,
pub shell: Option<Arc<Shell>>,
pub ignore_errors: Option<bool>,
pub verbose: Option<bool>,
pub is_nested: bool,
}
Expand description
Used to pass information to tasks This use arc to allow for sharing of data between tasks and allow parallel runs of tasks
Fieldsยง
ยงtask_root: Arc<TaskRoot>
ยงexecution_stack: ExecutionStack
ยงmulti: Arc<MultiProgress>
ยงenv_vars: HashMap<String, String>
ยงshell: Option<Arc<Shell>>
ยงignore_errors: Option<bool>
ยงverbose: Option<bool>
ยงis_nested: bool
Implementationsยง
Sourceยงimpl TaskContext
impl TaskContext
pub fn empty() -> Self
pub fn empty_with_root(task_root: Arc<TaskRoot>) -> Self
pub fn new(task_root: Arc<TaskRoot>, execution_stack: ExecutionStack) -> Self
pub fn from_context(context: &TaskContext) -> Self
pub fn from_context_with_args( context: &TaskContext, ignore_errors: bool, verbose: bool, ) -> Self
pub fn extend_env_vars<I>(&mut self, iter: I)
pub fn set_shell(&mut self, shell: &Shell)
pub fn set_ignore_errors(&mut self, ignore_errors: bool)
pub fn set_verbose(&mut self, verbose: bool)
pub fn shell(&self) -> Arc<Shell>
pub fn ignore_errors(&self) -> bool
pub fn verbose(&self) -> bool
Trait Implementationsยง
Sourceยงimpl Clone for TaskContext
impl Clone for TaskContext
Sourceยงfn clone(&self) -> TaskContext
fn clone(&self) -> TaskContext
Returns a duplicate of the value. Read more
1.0.0 ยท Sourceยงfn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementationsยง
impl Freeze for TaskContext
impl RefUnwindSafe for TaskContext
impl Send for TaskContext
impl Sync for TaskContext
impl Unpin for TaskContext
impl UnwindSafe for TaskContext
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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