pub struct OperationHandle { /* private fields */ }Expand description
Handle returned when starting an operation
The handle spawns a background heartbeat task and provides methods to update status and attach processes. When dropped, it signals completion of the operation.
Implementations§
Source§impl OperationHandle
impl OperationHandle
Sourcepub fn operation_id(&self) -> &str
pub fn operation_id(&self) -> &str
Get the operation ID
Sourcepub async fn update_status(&self, status: &str) -> Result<()>
pub async fn update_status(&self, status: &str) -> Result<()>
Update status (sends heartbeat)
Sourcepub async fn add_output(&self, line: &str) -> Result<()>
pub async fn add_output(&self, line: &str) -> Result<()>
Add output line
Sourcepub async fn attach_process(&self, process_id: u32) -> Result<()>
pub async fn attach_process(&self, process_id: u32) -> Result<()>
Attach a process for liveness monitoring
Trait Implementations§
Source§impl Drop for OperationHandle
impl Drop for OperationHandle
Auto Trait Implementations§
impl Freeze for OperationHandle
impl !RefUnwindSafe for OperationHandle
impl Send for OperationHandle
impl Sync for OperationHandle
impl Unpin for OperationHandle
impl UnsafeUnpin for OperationHandle
impl !UnwindSafe for OperationHandle
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