FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    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.

    View source

    Members

    is_completed

    fn is_completed(self: &Self) -> bool
    

    Whether the task has finished: completed, failed or cancelled.

    Source

    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.

    Source

    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.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ClassDefaults
    • ErasedDestructor
    • IntoEither

    Availability

    Extracted for x86_64-unknown-linux-gnu, aarch64-apple-darwin. Cargo features are listed in the crate index.