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.
Members
new
fn new() -> Self
task
fn task(self: &Self) -> TaskValue
The task completed by this source.
set_result
fn set_result<T: PropertyValue>(self: &Self, value: T)
Completes the task with value. Panics if the task has already
finished.
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.
set_exception
fn set_exception(self: &Self, error: BindingError)
Fails the task with error. Panics if the task has already finished.
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.
try_set_exception
fn try_set_exception(self: &Self, error: BindingError) -> bool
Fails the task with error unless it has already finished.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyErasedDestructorIntoEitherDefault
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.