pub struct JobHandle { /* private fields */ }Expand description
Identity and cancellation handle. Dropping a handle does not cancel its job.
Implementations§
Source§impl JobHandle
impl JobHandle
Sourcepub fn is_cancelled(&self) -> bool
pub fn is_cancelled(&self) -> bool
Whether cancellation or pool shutdown has been signalled.
Sourcepub fn accepts<R>(&self, completion: &Completion<R>) -> bool
pub fn accepts<R>(&self, completion: &Completion<R>) -> bool
Whether this completion belongs to a still-current, uncancelled request. Store the newest handle in game state and reject older completions here.
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