pub struct StepContext<'a> { /* private fields */ }Expand description
What a step is run with: the part, the runner running it, and its own
id — what everything it produces is named after. A step only declares
what it produces (StepContext::produce); what takes work is done in
the makes.
Implementations§
Source§impl<'a> StepContext<'a>
impl<'a> StepContext<'a>
Sourcepub fn reader(&self) -> Reader<'_>
pub fn reader(&self) -> Reader<'_>
The part as the step sees it so far, recording nothing: what a step that declares one node per element of something asks.
Sourcepub fn produce<T: Target, Args: PartialEq + Clone + Debug + 'static>(
&mut self,
target: &TargetReference<T>,
args: &Args,
make: Make<Args, T>,
) -> GeopResult<()>
pub fn produce<T: Target, Args: PartialEq + Clone + Debug + 'static>( &mut self, target: &TargetReference<T>, args: &Args, make: Make<Args, T>, ) -> GeopResult<()>
Produces the step’s node of target: reused if it was made from
equal args and everything it read reads the same now, else made by
make, at once, so that a later node of the step can read it. Fails
as make fails, or if the step produced target already, or — for
a target that is not a chain (Target::CHAIN) — if a step before
produced it, naming both.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for StepContext<'a>
impl<'a> !Send for StepContext<'a>
impl<'a> !Sync for StepContext<'a>
impl<'a> !UnwindSafe for StepContext<'a>
impl<'a> Freeze for StepContext<'a>
impl<'a> Unpin for StepContext<'a>
impl<'a> UnsafeUnpin for StepContext<'a>
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