pub struct Run<'d> { /* private fields */ }Expand description
A workflow run, one request at a time.
Implementations§
Source§impl<'d> Run<'d>
impl<'d> Run<'d>
Sourcepub fn start(
description: &'d Description,
options: &'d Options,
) -> Result<Self, ExecutionError>
pub fn start( description: &'d Description, options: &'d Options, ) -> Result<Self, ExecutionError>
Prepare a run: pick the workflow, order what it depends on, and stop before anything is sent.
§Errors
ExecutionError::UnknownWorkflow or
ExecutionError::Circular when the description does not
describe a runnable order.
Sourcepub fn advance(&mut self) -> Result<Progress, ExecutionError>
pub fn advance(&mut self) -> Result<Progress, ExecutionError>
Advance until something is needed from the caller.
Not called next: a run is not an iterator, because what comes
out of it has to be answered with Run::supply before there is
anything more to come.
§Errors
Whatever stopped the run — see ExecutionError.
Sourcepub fn supply(&mut self, response: HttpResponse) -> Result<(), ExecutionError>
pub fn supply(&mut self, response: HttpResponse) -> Result<(), ExecutionError>
Hand back the response to the request Run::advance asked for.
§Errors
Whatever the response made impossible — a criterion that cannot
be decided, an output that names nothing, a goto with no
target.
Auto Trait Implementations§
impl<'d> Freeze for Run<'d>
impl<'d> RefUnwindSafe for Run<'d>
impl<'d> Send for Run<'d>
impl<'d> Sync for Run<'d>
impl<'d> Unpin for Run<'d>
impl<'d> UnsafeUnpin for Run<'d>
impl<'d> UnwindSafe for Run<'d>
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