pub struct TaskHandle { /* private fields */ }Expand description
Handle returned by crate::Ui::spawn_task_with_callback representing an active background
task.
Can be retained on the UI thread to query status, obtain the task ID, or cancel the task.
Implementations§
Source§impl TaskHandle
impl TaskHandle
Sourcepub fn is_cancelled(&self) -> bool
pub fn is_cancelled(&self) -> bool
Returns true if cancellation has been requested.
Sourcepub fn is_finished(&self) -> bool
pub fn is_finished(&self) -> bool
Returns true if the background operation has completed.
Trait Implementations§
Source§impl Clone for TaskHandle
impl Clone for TaskHandle
Auto Trait Implementations§
impl Forget for TaskHandle
impl Freeze for TaskHandle
impl Move for TaskHandle
impl RefUnwindSafe for TaskHandle
impl Send for TaskHandle
impl Sync for TaskHandle
impl Unpin for TaskHandle
impl UnsafeUnpin for TaskHandlewhere
*const ArcInner<Atomic<bool>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Atomic<bool>>>: UnsafeUnpin,
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