pub struct SynchronousCompletionAsyncResultSource<T> { /* private fields */ }Expand description
The producer side of a SynchronousCompletionAsyncResult.
Implementations§
Source§impl<T: Clone + 'static> SynchronousCompletionAsyncResultSource<T>
impl<T: Clone + 'static> SynchronousCompletionAsyncResultSource<T>
pub fn new() -> Self
Sourcepub fn async_result(&self) -> SynchronousCompletionAsyncResult<T>
pub fn async_result(&self) -> SynchronousCompletionAsyncResult<T>
The consumer side of the operation.
Sourcepub fn set_result(&self, result: T)
pub fn set_result(&self, result: T)
Completes the operation and runs its continuations. Panics if it is already completed.
Sourcepub fn try_set_result(&self, result: T)
pub fn try_set_result(&self, result: T)
Completes the operation unless it is already completed.
Trait Implementations§
Source§impl<T> Clone for SynchronousCompletionAsyncResultSource<T>
impl<T> Clone for SynchronousCompletionAsyncResultSource<T>
Auto Trait Implementations§
impl<T> !RefUnwindSafe for SynchronousCompletionAsyncResultSource<T>
impl<T> !Send for SynchronousCompletionAsyncResultSource<T>
impl<T> !Sync for SynchronousCompletionAsyncResultSource<T>
impl<T> !UnwindSafe for SynchronousCompletionAsyncResultSource<T>
impl<T> Freeze for SynchronousCompletionAsyncResultSource<T>
impl<T> Unpin for SynchronousCompletionAsyncResultSource<T>
impl<T> UnsafeUnpin for SynchronousCompletionAsyncResultSource<T>
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