pub struct SynchronousCompletionAsyncResult<T: Clone> { /* private fields */ }Expand description
The result of an operation that either has completed already or completes later, in which case its continuations run synchronously at completion.
Implementations§
Source§impl<T: Clone + 'static> SynchronousCompletionAsyncResult<T>
impl<T: Clone + 'static> SynchronousCompletionAsyncResult<T>
pub fn is_completed(&self) -> bool
Sourcepub fn get_result(&self) -> T
pub fn get_result(&self) -> T
The result. Panics if the operation is not yet completed.
Sourcepub fn on_completed(&self, continuation: impl FnOnce() + 'static)
pub fn on_completed(&self, continuation: impl FnOnce() + 'static)
Runs continuation now if the operation has completed without a
source, otherwise when the source completes.
Trait Implementations§
Auto Trait Implementations§
impl<T> !RefUnwindSafe for SynchronousCompletionAsyncResult<T>
impl<T> !Send for SynchronousCompletionAsyncResult<T>
impl<T> !Sync for SynchronousCompletionAsyncResult<T>
impl<T> !UnwindSafe for SynchronousCompletionAsyncResult<T>
impl<T> Freeze for SynchronousCompletionAsyncResult<T>where
State<T>: Freeze,
impl<T> Unpin for SynchronousCompletionAsyncResult<T>where
State<T>: Unpin,
impl<T> UnsafeUnpin for SynchronousCompletionAsyncResult<T>where
State<T>: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more