Struct future_clicker::ControlledFuture
source · [−]pub struct ControlledFuture<T: Unpin> { /* private fields */ }Expand description
A Future that will resolve either immediately, or in the future.
Will not resolve unless it has been explicitly completed, either
by constructing it with ControlledFuture::new_completed, or using FutureClicker::complete.
Implementations
sourceimpl<T: Unpin + Send + 'static> ControlledFuture<T>
impl<T: Unpin + Send + 'static> ControlledFuture<T>
sourcepub fn new() -> (Self, FutureClicker<T>)
pub fn new() -> (Self, FutureClicker<T>)
Construct a ControlledFuture that will resolve once the returned
FutureClicker is used to set a value.
sourcepub fn new_completed(value: T) -> Self
pub fn new_completed(value: T) -> Self
Construct a ControlledFuture that will resolve immediately to the
given value.
No FutureClicker is returned as the ControlledFuture is already complete.
Trait Implementations
sourceimpl<T: Debug + Unpin> Debug for ControlledFuture<T>
impl<T: Debug + Unpin> Debug for ControlledFuture<T>
sourceimpl<T: Unpin + 'static + Send> Future for ControlledFuture<T>
impl<T: Unpin + 'static + Send> Future for ControlledFuture<T>
Auto Trait Implementations
impl<T> !RefUnwindSafe for ControlledFuture<T>
impl<T> Send for ControlledFuture<T>where
T: Send,
impl<T> Sync for ControlledFuture<T>where
T: Send,
impl<T> Unpin for ControlledFuture<T>
impl<T> !UnwindSafe for ControlledFuture<T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<F> IntoFuture for Fwhere
F: Future,
impl<F> IntoFuture for Fwhere
F: Future,
type IntoFuture = F
type IntoFuture = F
Which kind of future are we turning this into?
sourcefn into_future(self) -> <F as IntoFuture>::IntoFuture
fn into_future(self) -> <F as IntoFuture>::IntoFuture
Creates a future from a value. Read more