pub struct LocalCompletableTask<T> { /* private fields */ }
Expand description
Local, Current thread version of CompletableTask
that uses a Rc
instead of
an Arc
for inner storage.
Implementations§
Source§impl<T> LocalCompletableTask<T>
impl<T> LocalCompletableTask<T>
Sourcepub fn try_complete(&self, value: T) -> Result<(), T>
pub fn try_complete(&self, value: T) -> Result<(), T>
Attempts to complete this task. This will only actually fail if the task has already been completed. In this case, the original value will be returned back as the ‘Error’ type.
Sourcepub fn get(&self) -> Poll<T>
pub fn get(&self) -> Poll<T>
Returns the current status of this task. If the task is complete, returns
[Poll::Ready(T)
], otherwise returns Poll::Pending
Trait Implementations§
Source§impl<T> Clone for LocalCompletableTask<T>
impl<T> Clone for LocalCompletableTask<T>
Auto Trait Implementations§
impl<T> Freeze for LocalCompletableTask<T>
impl<T> !RefUnwindSafe for LocalCompletableTask<T>
impl<T> !Send for LocalCompletableTask<T>
impl<T> !Sync for LocalCompletableTask<T>
impl<T> Unpin for LocalCompletableTask<T>
impl<T> !UnwindSafe for LocalCompletableTask<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