pub struct TaskContext { /* private fields */ }Expand description
Immutable resolved values and task-local workspace for external Rust programs.
Implementations§
Source§impl TaskContext
impl TaskContext
Sourcepub fn from_env() -> Result<Self, Box<dyn Error + Send + Sync>>
pub fn from_env() -> Result<Self, Box<dyn Error + Send + Sync>>
Reads and verifies Workflow’s captured task snapshots from the environment.
Sourcepub fn output_directory(&self) -> &Path
pub fn output_directory(&self) -> &Path
Writable local task artifacts directory, never the authored input folder.
Sourcepub fn parameters<T: DeserializeOwned>(&self, section: &str) -> Result<T, Error>
pub fn parameters<T: DeserializeOwned>(&self, section: &str) -> Result<T, Error>
Resolved parameter section, decoded without another configuration compiler.
Sourcepub fn dependencies(&self) -> &Dependencies
pub fn dependencies(&self) -> &Dependencies
Correlated prerequisite results from declared dependency phases.
Sourcepub fn input(&self, name: &str) -> Result<ArtifactSet>
pub fn input(&self, name: &str) -> Result<ArtifactSet>
A named captured external input, accessed through immutable artifact references.
Auto Trait Implementations§
impl Forget for TaskContext
impl Freeze for TaskContextwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Value>: Freeze,
PhantomData<usize>: Freeze,
PhantomData<Bucket<String, Value>>: Freeze,
PhantomData<RecordingDependency>: Freeze,
PhantomData<ProgramDependency>: Freeze,
PhantomData<NpyDependency>: Freeze,
impl Move for TaskContext
impl RefUnwindSafe for TaskContext
impl Send for TaskContext
impl Sync for TaskContext
impl Unpin for TaskContext
impl UnsafeUnpin for TaskContextwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Value>: UnsafeUnpin,
PhantomData<usize>: UnsafeUnpin,
PhantomData<Bucket<String, Value>>: UnsafeUnpin,
PhantomData<RecordingDependency>: UnsafeUnpin,
PhantomData<ProgramDependency>: UnsafeUnpin,
PhantomData<NpyDependency>: UnsafeUnpin,
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> 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