pub struct JobHandle {
pub job_id: JobId,
pub correlation_id: MessageId,
/* private fields */
}Expand description
Handle to an in-flight job (RFC §10).
Fields§
§job_id: JobIdServer-assigned job identifier.
correlation_id: MessageIdCorrelation id of the originating tool.invoke.
Implementations§
Source§impl JobHandle
impl JobHandle
Sourcepub async fn join(&self) -> Result<Value, ARCPError>
pub async fn join(&self) -> Result<Value, ARCPError>
Await the terminal job event.
§Errors
Returns ARCPError::Cancelled if the job ended via
job.cancelled, ARCPError::Unknown for job.failed, or
ARCPError::Unavailable if the connection ended before the
terminal event was observed.
Sourcepub async fn cancel(&self, reason: impl Into<String>) -> Result<(), ARCPError>
pub async fn cancel(&self, reason: impl Into<String>) -> Result<(), ARCPError>
Send a cancel envelope for this job. Does not await the
cancel.accepted reply; the next Self::join reflects the
cancellation outcome.
§Errors
Returns ARCPError::Unavailable if the transport is already
closed.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for JobHandle
impl !RefUnwindSafe for JobHandle
impl Send for JobHandle
impl Sync for JobHandle
impl Unpin for JobHandle
impl UnsafeUnpin for JobHandle
impl !UnwindSafe for JobHandle
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