pub struct Future { /* private fields */ }
Expand description
A simple future which can complete once, and calls some callback(s) when it does so.
Clones can be made and all futures cloned from the same source will complete at the same time.
Implementations§
source§impl Future
impl Future
sourcepub fn register_callback(&self, callback: Box<dyn FutureCallback>)
pub fn register_callback(&self, callback: Box<dyn FutureCallback>)
Registers a callback to be called upon completion of this future. If the future has already completed, the callback will be called immediately.
This is not exported to bindings users, use the bindings-only register_callback_fn
instead
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Future
impl RefUnwindSafe for Future
impl Send for Future
impl Sync for Future
impl Unpin for Future
impl UnwindSafe for Future
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<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?
source§fn into_future(self) -> <F as IntoFuture>::IntoFuture
fn into_future(self) -> <F as IntoFuture>::IntoFuture
Creates a future from a value. Read more