Struct barley_interface::Interface
source · pub struct Interface { /* private fields */ }Expand description
A simple CLI interface for the barley workflow engine.
This interface is not yet complete, but should be used instead
of the Context struct from the barley-runtime crate,
since it will require no extra modifications when stable.
Implementations§
source§impl Interface
impl Interface
sourcepub async fn add_action<A: Action + 'static>(
&self,
action: A
) -> Arc<dyn Action + 'static>
pub async fn add_action<A: Action + 'static>( &self, action: A ) -> Arc<dyn Action + 'static>
Add an action to the context.
sourcepub async fn get_output(&self, action: &dyn Action) -> Option<ActionOutput>
pub async fn get_output(&self, action: &dyn Action) -> Option<ActionOutput>
Gets the output of the action.
This method will return None if the action
has not been run yet. See Context::get_output
for more information.
sourcepub async fn get_output_arc(
&self,
action: Arc<dyn Action + 'static>
) -> Option<ActionOutput>
pub async fn get_output_arc( &self, action: Arc<dyn Action + 'static> ) -> Option<ActionOutput>
Gets the output of an action Arc.
See Context::get_output_arc for more information.
Auto Trait Implementations§
impl !RefUnwindSafe for Interface
impl Send for Interface
impl Sync for Interface
impl Unpin for Interface
impl !UnwindSafe for Interface
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