FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    SynchronousCompletionAsyncResult

    struct · ferroui-base · v0.5.0

    struct SynchronousCompletionAsyncResult<T: Clone>
    

    The result of an operation that either has completed already or completes later, in which case its continuations run synchronously at completion.

    View source

    Members

    new

    fn new(result: T) -> Self
    

    Creates a completed result.

    Source

    is_completed

    fn is_completed(self: &Self) -> bool
    

    Source

    get_result

    fn get_result(self: &Self) -> T
    

    The result. Panics if the operation is not yet completed.

    Source

    on_completed

    fn on_completed(self: &Self, continuation: impl FnOnce() -> () + 'static)
    

    Runs continuation now if the operation has completed without a source, otherwise when the source completes.

    Source

    Trait implementations

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

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.