pub struct TaskProgram { /* private fields */ }Expand description
A task program whose modules are loaded, ready to run.
Implementations§
Source§impl TaskProgram
impl TaskProgram
Sourcepub fn load(task: TaskInfo, print: &dyn PrintSink) -> ProgramLoad
pub fn load(task: TaskInfo, print: &dyn PrintSink) -> ProgramLoad
Parse the task block and load every module it loads, directly or indirectly.
A load path is relative to the loading file, or absolute. Each module is
evaluated once per task, outside the task, with print output going to
print.
Sourcepub fn load_noting(
task: TaskInfo,
print: &dyn PrintSink,
noting: bool,
) -> ProgramLoad
pub fn load_noting( task: TaskInfo, print: &dyn PrintSink, noting: bool, ) -> ProgramLoad
Load the task program as TaskProgram::load does; when noting is set,
also note how each module read and each file access ended, in
ProgramLoad::outcomes and then in TaskRun::outcomes of its run, for
the observation report of kizz run --output.
Sourcepub const fn hash(&self) -> ProgramHash
pub const fn hash(&self) -> ProgramHash
The hash of the block and every module it loads.
Sourcepub const fn parts(&self) -> &ProgramParts
pub const fn parts(&self) -> &ProgramParts
The hashes of the block and of each module it loads, so explanations can name the part that changed.
Sourcepub fn run(
self,
caller: &BTreeMap<String, String>,
executor: &dyn StepExecutor,
print: &dyn PrintSink,
) -> TaskRun
pub fn run( self, caller: &BTreeMap<String, String>, executor: &dyn StepExecutor, print: &dyn PrintSink, ) -> TaskRun
Evaluate the task block, handing each run() call to executor in program
order, with print output going to print.
The task environment starts empty. caller is the caller environment, the
only one that env.caller and env.inherit read. The result holds every
file access the program made while it ran, and every file it changed,
whether or not it failed, and every step it left unchecked: when the
program ends, whether it succeeded or failed, each step that exited with a
non-zero code or was killed by a signal, whose run() had no expect, and
whose result’s rc and signal the program never read.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for TaskProgram
impl !UnwindSafe for TaskProgram
impl Freeze for TaskProgram
impl Send for TaskProgram
impl Sync for TaskProgram
impl Unpin for TaskProgram
impl UnsafeUnpin for TaskProgram
Blanket Implementations§
impl<T> AsTypeStaticRegistered for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> HasTyVTable for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> ⓘ
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> ⓘ
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