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.
Members
new
fn new(result: T) -> Self
Creates a completed result.
is_completed
fn is_completed(self: &Self) -> bool
get_result
fn get_result(self: &Self) -> T
The result. Panics if the operation is not yet completed.
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.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedErasedDestructorIntoEitherClone
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.