pub struct TaskInputs { /* private fields */ }Expand description
Represents inputs to a task.
Implementations§
Source§impl TaskInputs
impl TaskInputs
Sourcepub fn iter(&self) -> impl Iterator<Item = (&str, &Value)> + use<'_>
pub fn iter(&self) -> impl Iterator<Item = (&str, &Value)> + use<'_>
Iterates the inputs to the task.
Sourcepub fn set(
&mut self,
name: impl Into<String>,
value: impl Into<Value>,
) -> Option<Value>
pub fn set( &mut self, name: impl Into<String>, value: impl Into<Value>, ) -> Option<Value>
Sets a task input.
Returns the previous value, if any.
Sourcepub fn requirement(&self, name: &str) -> Option<&Value>
pub fn requirement(&self, name: &str) -> Option<&Value>
Gets an overridden requirement by name.
Sourcepub fn override_requirement(
&mut self,
name: impl Into<String>,
value: impl Into<Value>,
)
pub fn override_requirement( &mut self, name: impl Into<String>, value: impl Into<Value>, )
Overrides a requirement by name.
Sourcepub fn override_hint(
&mut self,
name: impl Into<String>,
value: impl Into<Value>,
)
pub fn override_hint( &mut self, name: impl Into<String>, value: impl Into<Value>, )
Overrides a hint by name.
Sourcepub async fn join_paths<'a>(
&mut self,
task: &Task,
path: impl Fn(&str) -> Result<&'a EvaluationPath>,
) -> Result<()>
pub async fn join_paths<'a>( &mut self, task: &Task, path: impl Fn(&str) -> Result<&'a EvaluationPath>, ) -> Result<()>
Replaces any File or Directory input values with joining the
specified path with the value.
This method will attempt to coerce matching input values to their expected types.
Trait Implementations§
Source§impl Clone for TaskInputs
impl Clone for TaskInputs
Source§fn clone(&self) -> TaskInputs
fn clone(&self) -> TaskInputs
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 moreSource§impl Debug for TaskInputs
impl Debug for TaskInputs
Source§impl Default for TaskInputs
impl Default for TaskInputs
Source§fn default() -> TaskInputs
fn default() -> TaskInputs
Returns the “default value” for a type. Read more
Source§impl From<TaskInputs> for Inputs
impl From<TaskInputs> for Inputs
Source§fn from(inputs: TaskInputs) -> Self
fn from(inputs: TaskInputs) -> Self
Converts to this type from the input type.
Source§impl<S, V> FromIterator<(S, V)> for TaskInputs
impl<S, V> FromIterator<(S, V)> for TaskInputs
Auto Trait Implementations§
impl Freeze for TaskInputs
impl RefUnwindSafe for TaskInputs
impl Send for TaskInputs
impl Sync for TaskInputs
impl Unpin for TaskInputs
impl UnwindSafe for TaskInputs
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> 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