pub struct SpinFuture { /* private fields */ }
Expand description
A future that can be polled once before it becomes ready; useful to cooperatively give up a timeslice to the runtime/other pending futures
§Behaviour
Polling this future will immediately wake the waker again and yield, making room for other futures to execute. This is useful for e.g. running intensive loops or similar inside a future.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SpinFuture
impl RefUnwindSafe for SpinFuture
impl Send for SpinFuture
impl Sync for SpinFuture
impl Unpin for SpinFuture
impl UnwindSafe for SpinFuture
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,
Source§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