HeadlessUnitTestTask
struct · ferroui-headless · v0.5.0
struct HeadlessUnitTestTask<T>
The outcome of an action dispatched to a HeadlessUnitTestSession;
what the original returns as a task object.
Members
is_completed
fn is_completed(self: &Self) -> bool
Whether the task has finished: completed, failed or cancelled.
wait
fn wait(self: Self) -> Result<T, Canceled>
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.
wait_timeout
fn wait_timeout(self: Self, timeout: Duration) -> Result<T, Canceled>
Blocks until the task has finished or timeout has passed
(WaitAsync(TimeSpan)).
Panics
Panics when the task has not finished in time (TimeoutException);
otherwise as wait.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyClassDefaultsErasedDestructorIntoEither
Availability
Extracted for x86_64-unknown-linux-gnu, aarch64-apple-darwin. Cargo features are listed in the crate index.