FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    SchedulerOperationAwaiter

    struct · ferroui-reactive · v0.5.0

    struct SchedulerOperationAwaiter
    

    The awaiter of a SchedulerOperation (SchedulerOperationAwaiter): the members the await of C# calls, and the Future that .await polls.

    View source

    Members

    is_completed

    fn is_completed(self: &Self) -> bool
    

    Whether the operation has ended: false unless its token is cancelled (IsCompleted).

    Source

    get_result

    fn get_result(self: &Self) -> Result<(), ObservableError>
    

    The outcome of the operation: a cancellation (Canceled) when its token is cancelled (GetResult, which throws OperationCanceledException).

    Source

    on_completed

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

    Schedules continuation on the scheduler of the operation (OnCompleted); the cancellation of the token runs it at once instead, disposing what was scheduled. When the operation was configured to continue on the captured context, the continuation is posted to the current synchronization context of the thread, if there is one, when it runs.

    Panics

    When the awaiter was given a continuation already (InvalidOperationException).

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • TaskObservableExt<T>
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • IntoFuture
    • ToOwned
    • Clone
    • Future

    Availability

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