pub struct TaskCompletionSource { /* private fields */ }Expand description
TaskCompletionSource<int> of the upstream code: the producing side of a
Task.
Implementations§
Source§impl TaskCompletionSource
impl TaskCompletionSource
pub fn new() -> TaskCompletionSource
Sourcepub fn try_set_result(&self) -> bool
pub fn try_set_result(&self) -> bool
TrySetResult: false when the task was already completed.
Sourcepub fn try_set_exception(&self, error: Error) -> bool
pub fn try_set_exception(&self, error: Error) -> bool
TrySetException: false when the task was already completed.
Trait Implementations§
Source§impl Clone for TaskCompletionSource
impl Clone for TaskCompletionSource
Auto Trait Implementations§
impl Freeze for TaskCompletionSource
impl RefUnwindSafe for TaskCompletionSource
impl Send for TaskCompletionSource
impl Sync for TaskCompletionSource
impl Unpin for TaskCompletionSource
impl UnsafeUnpin for TaskCompletionSource
impl UnwindSafe for TaskCompletionSource
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