pub struct WorkflowHandle { /* private fields */ }Expand description
A handle to control a running workflow from another task/thread
Allows suspending and resuming a workflow execution externally.
Obtain via WorkflowRunner::handle() before calling run().
Implementations§
Source§impl WorkflowHandle
impl WorkflowHandle
Sourcepub fn suspend(&self) -> bool
pub fn suspend(&self) -> bool
Suspends the workflow. Returns true if suspended, false if already suspended.
Sourcepub fn resume(&self) -> bool
pub fn resume(&self) -> bool
Resumes a suspended workflow. Returns true if resumed, false if not suspended.
Sourcepub fn is_suspended(&self) -> bool
pub fn is_suspended(&self) -> bool
Checks if the workflow is currently suspended
Trait Implementations§
Source§impl Clone for WorkflowHandle
impl Clone for WorkflowHandle
Source§fn clone(&self) -> WorkflowHandle
fn clone(&self) -> WorkflowHandle
Returns a duplicate of the value. Read more
1.0.0 · 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 Freeze for WorkflowHandle
impl RefUnwindSafe for WorkflowHandle
impl Send for WorkflowHandle
impl Sync for WorkflowHandle
impl Unpin for WorkflowHandle
impl UnsafeUnpin for WorkflowHandle
impl UnwindSafe for WorkflowHandle
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