FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    TaskValueSource

    struct · ferroui-base · v0.5.0

    struct TaskValueSource
    

    The producer side of a TaskValue that is not bound to a future: the equivalent of a task completion source.

    View source

    Members

    new

    fn new() -> Self
    

    Source

    task

    fn task(self: &Self) -> TaskValue
    

    The task completed by this source.

    Source

    set_result

    fn set_result<T: PropertyValue>(self: &Self, value: T)
    

    Completes the task with value. Panics if the task has already finished.

    Source

    set_untyped_result

    fn set_untyped_result(self: &Self, value: Option<BoxedValue>)
    

    Completes the task with an untyped value. Panics if the task has already finished.

    Source

    set_exception

    fn set_exception(self: &Self, error: BindingError)
    

    Fails the task with error. Panics if the task has already finished.

    Source

    try_set_untyped_result

    fn try_set_untyped_result(self: &Self, value: Option<BoxedValue>) -> bool
    

    Completes the task with an untyped value unless it has already finished.

    Source

    try_set_exception

    fn try_set_exception(self: &Self, error: BindingError) -> bool
    

    Fails the task with error unless it has already finished.

    Source

    Trait implementations

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

    Availability

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