pub struct WorkflowHandle {
pub id: WorkflowId,
/* private fields */
}Expand description
Handle to interact with a running workflow
Fields§
§id: WorkflowIdWorkflow ID
Implementations§
Source§impl WorkflowHandle
impl WorkflowHandle
Sourcepub fn new(id: WorkflowId, event_tx: Sender<WorkflowEvent>) -> Self
pub fn new(id: WorkflowId, event_tx: Sender<WorkflowEvent>) -> Self
Create a new workflow handle
Sourcepub async fn send_event(
&self,
event: WorkflowEvent,
) -> Result<(), WorkflowError>
pub async fn send_event( &self, event: WorkflowEvent, ) -> Result<(), WorkflowError>
Send an event to the workflow
Sourcepub async fn status(&self) -> WorkflowStatus
pub async fn status(&self) -> WorkflowStatus
Get the current status of the workflow
Sourcepub async fn cancel(&self) -> Result<(), WorkflowError>
pub async fn cancel(&self) -> Result<(), WorkflowError>
Cancel the workflow
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 !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