pub struct FutureClicker<T: Unpin + Send + 'static> { /* private fields */ }
Expand description
Used to complete a ControlledFuture
so it may resolve to the given value.
Dropping a FutureClicker
without calling FutureClicker::complete
will
cause the ControlledFuture
to panic.
Implementations§
Source§impl<T: Unpin + Send + 'static> FutureClicker<T>
impl<T: Unpin + Send + 'static> FutureClicker<T>
Sourcepub fn complete(self, value: T) -> Result<()>
pub fn complete(self, value: T) -> Result<()>
Complete the associated ControlledFuture
.
§Errors
Error::AlreadyCompleted
- TheControlledFuture
future is already resolved.Error::CompleterDropped
- TheFutureClicker
has already been dropped.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for FutureClicker<T>
impl<T> !RefUnwindSafe for FutureClicker<T>
impl<T> Send for FutureClicker<T>
impl<T> Sync for FutureClicker<T>
impl<T> Unpin for FutureClicker<T>
impl<T> !UnwindSafe for FutureClicker<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