pub struct HeadlessUnitTestTask<T> { /* private fields */ }Expand description
The outcome of an action dispatched to a HeadlessUnitTestSession;
what the original returns as a task object.
Implementations§
Source§impl<T> HeadlessUnitTestTask<T>
impl<T> HeadlessUnitTestTask<T>
Sourcepub fn is_completed(&self) -> bool
pub fn is_completed(&self) -> bool
Whether the task has finished: completed, failed or cancelled.
Sourcepub fn wait(self) -> Result<T, OperationCanceledError>
pub fn wait(self) -> Result<T, OperationCanceledError>
Blocks until the task has finished and takes its result
(GetAwaiter().GetResult()). Not to be called on the session thread,
which is the thread that has to make progress.
§Panics
Raises the panic of the dispatched action, or of the cleanup after it, again. Panics when the outcome has already been taken.
Sourcepub fn wait_timeout(
self,
timeout: Duration,
) -> Result<T, OperationCanceledError>
pub fn wait_timeout( self, timeout: Duration, ) -> Result<T, OperationCanceledError>
Auto Trait Implementations§
impl<T> Freeze for HeadlessUnitTestTask<T>
impl<T> RefUnwindSafe for HeadlessUnitTestTask<T>where
Arc<TaskShared<T>>: RefUnwindSafe,
impl<T> Send for HeadlessUnitTestTask<T>
impl<T> Sync for HeadlessUnitTestTask<T>
impl<T> Unpin for HeadlessUnitTestTask<T>
impl<T> UnsafeUnpin for HeadlessUnitTestTask<T>where
Arc<TaskShared<T>>: UnsafeUnpin,
impl<T> UnwindSafe for HeadlessUnitTestTask<T>where
Arc<TaskShared<T>>: UnwindSafe,
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
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more