pub struct AutomationEngine { /* private fields */ }Expand description
Automation engine
Implementations§
Source§impl AutomationEngine
impl AutomationEngine
pub fn new(max_history: usize) -> Self
Sourcepub async fn unregister(&self, workflow_id: &str) -> Result<()>
pub async fn unregister(&self, workflow_id: &str) -> Result<()>
Unregister a workflow
Sourcepub async fn get_workflow(&self, workflow_id: &str) -> Option<Workflow>
pub async fn get_workflow(&self, workflow_id: &str) -> Option<Workflow>
Get workflow
Sourcepub async fn list_workflows(&self) -> Vec<Workflow>
pub async fn list_workflows(&self) -> Vec<Workflow>
List all workflows
Sourcepub async fn trigger(
&self,
workflow_id: &str,
event: Option<Value>,
) -> Result<String>
pub async fn trigger( &self, workflow_id: &str, event: Option<Value>, ) -> Result<String>
Trigger a workflow manually
Sourcepub async fn get_runs(
&self,
workflow_id: Option<&str>,
limit: usize,
) -> Vec<WorkflowRun>
pub async fn get_runs( &self, workflow_id: Option<&str>, limit: usize, ) -> Vec<WorkflowRun>
Get run history
Sourcepub async fn get_run(&self, run_id: &str) -> Option<WorkflowRun>
pub async fn get_run(&self, run_id: &str) -> Option<WorkflowRun>
Get specific run
Auto Trait Implementations§
impl Freeze for AutomationEngine
impl !RefUnwindSafe for AutomationEngine
impl Send for AutomationEngine
impl Sync for AutomationEngine
impl Unpin for AutomationEngine
impl UnsafeUnpin for AutomationEngine
impl !UnwindSafe for AutomationEngine
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> 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