pub struct Runtime { /* private fields */ }Expand description
The runtime for a workflow.
This struct is used to run a workflow. It contains all of the actions that need to be run, and it ensures that all dependencies are run before the actions that depend on them.
§Example
use barley_runtime::prelude::*;
let runtime = RuntimeBuilder::new().build();Implementations§
Source§impl Runtime
impl Runtime
Sourcepub async fn perform(self) -> Result<(), ActionError>
pub async fn perform(self) -> Result<(), ActionError>
Run the workflow.
Sourcepub async fn rollback(self) -> Result<(), ActionError>
pub async fn rollback(self) -> Result<(), ActionError>
Rollback the workflow.
This will undo all of the actions that have been performed, if possible.
Sourcepub async fn get_output(&self, obj: ActionObject) -> Option<ActionOutput>
pub async fn get_output(&self, obj: ActionObject) -> Option<ActionOutput>
Get the output of an action.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Runtime
impl !RefUnwindSafe for Runtime
impl Send for Runtime
impl Sync for Runtime
impl Unpin for Runtime
impl !UnwindSafe for Runtime
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