Struct pliantdb_jobs::task::Handle [−][src]
pub struct Handle<T, Key> { pub id: Id, // some fields omitted }
Expand description
References a background task.
Fields
id: Id
The task’s id.
Implementations
Returns a copy of this handle. When the job is completed, both handles
will be able to receive()
the results.
Waits for the job to complete and returns the result.
Errors
Returns an error if the job is cancelled.
Tries to receive the status of the job. If available, it is returned. This function will not block.
Errors
Returns an error if the job isn’t complete.
TryRecvError::Disconnected
: The job has been cancelled.TryRecvError::Empty
: The job has not completed yet.
Trait Implementations
Auto Trait Implementations
impl<T, Key> !RefUnwindSafe for Handle<T, Key>
impl<T, Key> !UnwindSafe for Handle<T, Key>