pub struct TaskHandle {
pub id: TaskId,
/* private fields */
}Expand description
Handle to a submitted task
Fields§
§id: TaskIdTask ID
Implementations§
Source§impl TaskHandle
impl TaskHandle
Sourcepub fn new(id: TaskId) -> TaskHandle
pub fn new(id: TaskId) -> TaskHandle
Create a new task handle
Sourcepub fn status(&self) -> TaskStatus
pub fn status(&self) -> TaskStatus
Get current task status
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Check if task is complete
Sourcepub async fn result(&self) -> Result<TaskResult, PolarisError>
pub async fn result(&self) -> Result<TaskResult, PolarisError>
Get task result (blocks until complete)
Trait Implementations§
Source§impl Clone for TaskHandle
impl Clone for TaskHandle
Source§fn clone(&self) -> TaskHandle
fn clone(&self) -> TaskHandle
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 TaskHandle
impl !RefUnwindSafe for TaskHandle
impl Send for TaskHandle
impl Sync for TaskHandle
impl Unpin for TaskHandle
impl !UnwindSafe for TaskHandle
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