pub struct FlowWorker { /* private fields */ }Expand description
Worker that handles queued workflow tasks against a FlowEngine.
Implementations§
Source§impl FlowWorker
impl FlowWorker
pub fn new(engine: FlowEngine, queue: Arc<dyn FlowTaskQueue>) -> Self
pub fn in_memory(engine: FlowEngine) -> Self
pub fn engine(&self) -> &FlowEngine
pub fn queue(&self) -> Arc<dyn FlowTaskQueue>
pub async fn enqueue(&self, task: FlowTask) -> Result<()>
pub async fn handle(&self, task: FlowTask) -> Result<FlowTaskOutcome>
pub async fn run_once(&self) -> Result<Option<FlowTaskOutcome>>
pub async fn run_until_idle(&self) -> Result<Vec<FlowTaskOutcome>>
Trait Implementations§
Source§impl Clone for FlowWorker
impl Clone for FlowWorker
Source§fn clone(&self) -> FlowWorker
fn clone(&self) -> FlowWorker
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for FlowWorker
impl !UnwindSafe for FlowWorker
impl Freeze for FlowWorker
impl Send for FlowWorker
impl Sync for FlowWorker
impl Unpin for FlowWorker
impl UnsafeUnpin for FlowWorker
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